[Pkg-voip-commits] [kamailio] 05/09: Imported Upstream version 4.1.4

Victor Seva Lopez maniac-guest at moszumanska.debian.org
Sun Jun 15 09:32:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

maniac-guest pushed a commit to branch master
in repository kamailio.

commit b22c4787581561b7cb73384d65d3b77c50a5f652
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Date:   Sat Jun 14 16:30:54 2014 +0200

    Imported Upstream version 4.1.4
---
 ChangeLog                                          |  488 +++++++
 Makefile.defs                                      |    2 +-
 autover.h                                          |    4 +-
 cfg.y                                              |    3 +-
 dns_cache.c                                        |    4 +-
 forward.h                                          |    2 +
 lib/srdb1/db.c                                     |    2 +
 main.c                                             |   12 +
 mem/f_malloc.c                                     |   18 +-
 mem/q_malloc.c                                     |    6 +-
 modules/acc/acc_cdr.c                              |    2 +-
 modules/acc/acc_logic.c                            |   18 +-
 modules/app_java/Makefile                          |    9 +
 modules/app_java/doc/app_java.xml                  |   10 +-
 modules/app_java/doc/app_java_admin.xml            |  136 +-
 modules/auth/auth_mod.c                            |    3 +-
 modules/auth_db/authorize.c                        |   28 +-
 modules/auth_radius/sterman.c                      |    2 +-
 modules/cnxcc/cnxcc_check.c                        |   30 +-
 modules/cnxcc/cnxcc_mod.c                          |  208 ++-
 modules/cnxcc/cnxcc_select.c                       |    4 +-
 modules/db_flatstore/km_flat_con.c                 |    1 +
 modules/db_mysql/km_dbase.c                        |   12 +-
 modules/db_mysql/km_res.c                          |    2 +
 modules/dialog/dlg_handlers.c                      |   13 +-
 modules/dialog/dlg_var.c                           |   18 +-
 modules/drouting/drouting.c                        |    2 +-
 modules/ipops/ipops_pv.c                           |    1 +
 modules/mtree/mtree_mod.c                          |    8 +-
 modules/pipelimit/pipelimit.c                      |    2 +-
 modules/presence_dialoginfo/notify_body.c          |    6 +-
 modules/pv/pv_core.c                               |    5 +
 modules/pv/pv_trans.c                              |   10 +-
 modules/rls/list.h                                 |   10 +-
 modules/rls/notify.c                               |    2 +-
 modules/rls/subscribe.c                            |    2 +
 modules/rls/utils.h                                |    2 +-
 modules/rtimer/rtimer_mod.c                        |    6 +
 modules/siputils/checks.c                          |    2 +-
 modules/siputils/sipops.c                          |   15 +-
 modules/topoh/th_msg.c                             |    2 +-
 modules/websocket/ws_conn.c                        |  180 ++-
 modules/websocket/ws_conn.h                        |    8 +
 modules/websocket/ws_frame.c                       |  182 ++-
 modules/websocket/ws_handshake.c                   |    4 +-
 parser/sdp/sdp.c                                   |    3 +-
 parser/sdp/sdp_helpr_funcs.c                       |   34 +-
 pkg/kamailio/centos/6/README                       |   27 +
 pkg/kamailio/centos/6/kamailio.init                |  134 ++
 pkg/kamailio/centos/6/kamailio.spec                | 1179 +++++++++++++++++
 pkg/kamailio/centos/6/kamailio.sysconfig           |   30 +
 pkg/kamailio/deb/debian/backports/jessie           |   19 +
 pkg/kamailio/deb/debian/backports/precise          |   32 +
 pkg/kamailio/deb/debian/backports/squeeze          |   77 ++
 pkg/kamailio/deb/debian/backports/wheezy           |   38 +
 pkg/kamailio/deb/debian/changelog                  |  112 ++
 pkg/kamailio/deb/debian/compat                     |    1 +
 pkg/kamailio/deb/debian/control                    |  570 +++++++++
 pkg/kamailio/deb/debian/copyright                  |  335 +++++
 .../kamailio-autheph-modules.lintian-overrides     |    1 +
 pkg/kamailio/deb/debian/kamailio-berkeley-bin.dirs |    1 +
 .../kamailio-dnssec-modules.lintian-overrides      |    1 +
 .../kamailio-outbound-modules.lintian-overrides    |    1 +
 .../debian/kamailio-tls-modules.lintian-overrides  |    1 +
 .../kamailio-websocket-modules.lintian-overrides   |    1 +
 pkg/kamailio/deb/debian/kamailio.README.Debian     |   39 +
 pkg/kamailio/deb/debian/kamailio.default           |   28 +
 pkg/kamailio/deb/debian/kamailio.examples          |    2 +
 pkg/kamailio/deb/debian/kamailio.init              |  162 +++
 pkg/kamailio/deb/debian/kamailio.lintian-overrides |    2 +
 pkg/kamailio/deb/debian/kamailio.postinst          |   24 +
 pkg/kamailio/deb/debian/rules                      |  221 ++++
 pkg/kamailio/deb/debian/source.lintian-overrides   |    1 +
 pkg/kamailio/deb/debian/source/format              |    1 +
 pkg/kamailio/deb/debian/watch                      |    3 +
 pkg/kamailio/deb/jessie/changelog                  |  112 ++
 pkg/kamailio/deb/jessie/compat                     |    1 +
 pkg/kamailio/deb/jessie/control                    |  569 +++++++++
 pkg/kamailio/deb/jessie/copyright                  |  335 +++++
 .../kamailio-autheph-modules.lintian-overrides     |    1 +
 pkg/kamailio/deb/jessie/kamailio-berkeley-bin.dirs |    1 +
 .../kamailio-dnssec-modules.lintian-overrides      |    1 +
 .../kamailio-outbound-modules.lintian-overrides    |    1 +
 .../jessie/kamailio-tls-modules.lintian-overrides  |    1 +
 .../kamailio-websocket-modules.lintian-overrides   |    1 +
 pkg/kamailio/deb/jessie/kamailio.README.Debian     |   39 +
 pkg/kamailio/deb/jessie/kamailio.default           |   28 +
 pkg/kamailio/deb/jessie/kamailio.examples          |    2 +
 pkg/kamailio/deb/jessie/kamailio.init              |  162 +++
 pkg/kamailio/deb/jessie/kamailio.lintian-overrides |    2 +
 pkg/kamailio/deb/jessie/kamailio.postinst          |   24 +
 pkg/kamailio/deb/jessie/rules                      |  221 ++++
 pkg/kamailio/deb/jessie/source.lintian-overrides   |    1 +
 pkg/kamailio/deb/jessie/source/format              |    1 +
 pkg/kamailio/deb/jessie/watch                      |    3 +
 pkg/kamailio/deb/precise/changelog                 |  112 ++
 pkg/kamailio/deb/precise/compat                    |    1 +
 pkg/kamailio/deb/precise/control                   |  556 ++++++++
 pkg/kamailio/deb/precise/copyright                 |  335 +++++
 .../kamailio-autheph-modules.lintian-overrides     |    1 +
 .../deb/precise/kamailio-berkeley-bin.dirs         |    1 +
 .../kamailio-dnssec-modules.lintian-overrides      |    1 +
 .../kamailio-outbound-modules.lintian-overrides    |    1 +
 .../precise/kamailio-tls-modules.lintian-overrides |    1 +
 .../kamailio-websocket-modules.lintian-overrides   |    1 +
 pkg/kamailio/deb/precise/kamailio.README.Debian    |   39 +
 pkg/kamailio/deb/precise/kamailio.default          |   28 +
 pkg/kamailio/deb/precise/kamailio.examples         |    2 +
 pkg/kamailio/deb/precise/kamailio.init             |  162 +++
 .../deb/precise/kamailio.lintian-overrides         |    2 +
 pkg/kamailio/deb/precise/kamailio.postinst         |   24 +
 pkg/kamailio/deb/precise/rules                     |  220 ++++
 pkg/kamailio/deb/precise/source.lintian-overrides  |    1 +
 pkg/kamailio/deb/precise/source/format             |    1 +
 pkg/kamailio/deb/precise/watch                     |    3 +
 pkg/kamailio/deb/squeeze/changelog                 |  112 ++
 pkg/kamailio/deb/squeeze/compat                    |    1 +
 pkg/kamailio/deb/squeeze/control                   |  456 +++++++
 pkg/kamailio/deb/squeeze/copyright                 |  335 +++++
 .../kamailio-autheph-modules.lintian-overrides     |    1 +
 .../deb/squeeze/kamailio-berkeley-bin.dirs         |    1 +
 .../kamailio-dnssec-modules.lintian-overrides      |    1 +
 .../kamailio-outbound-modules.lintian-overrides    |    1 +
 .../squeeze/kamailio-tls-modules.lintian-overrides |    1 +
 .../kamailio-websocket-modules.lintian-overrides   |    1 +
 pkg/kamailio/deb/squeeze/kamailio.README.Debian    |   39 +
 pkg/kamailio/deb/squeeze/kamailio.default          |   28 +
 pkg/kamailio/deb/squeeze/kamailio.examples         |    2 +
 pkg/kamailio/deb/squeeze/kamailio.init             |  162 +++
 .../deb/squeeze/kamailio.lintian-overrides         |    2 +
 pkg/kamailio/deb/squeeze/kamailio.postinst         |   24 +
 pkg/kamailio/deb/squeeze/rules                     |  218 ++++
 pkg/kamailio/deb/squeeze/source.lintian-overrides  |    1 +
 pkg/kamailio/deb/squeeze/source/format             |    1 +
 pkg/kamailio/deb/squeeze/watch                     |    3 +
 pkg/kamailio/deb/wheezy/changelog                  |  112 ++
 pkg/kamailio/deb/wheezy/compat                     |    1 +
 pkg/kamailio/deb/wheezy/control                    |  542 ++++++++
 pkg/kamailio/deb/wheezy/copyright                  |  335 +++++
 .../kamailio-autheph-modules.lintian-overrides     |    1 +
 pkg/kamailio/deb/wheezy/kamailio-berkeley-bin.dirs |    1 +
 .../kamailio-dnssec-modules.lintian-overrides      |    1 +
 .../kamailio-outbound-modules.lintian-overrides    |    1 +
 .../wheezy/kamailio-tls-modules.lintian-overrides  |    1 +
 .../kamailio-websocket-modules.lintian-overrides   |    1 +
 pkg/kamailio/deb/wheezy/kamailio.README.Debian     |   39 +
 pkg/kamailio/deb/wheezy/kamailio.default           |   28 +
 pkg/kamailio/deb/wheezy/kamailio.examples          |    2 +
 pkg/kamailio/deb/wheezy/kamailio.init              |  162 +++
 pkg/kamailio/deb/wheezy/kamailio.lintian-overrides |    2 +
 pkg/kamailio/deb/wheezy/kamailio.postinst          |   24 +
 pkg/kamailio/deb/wheezy/rules                      |  220 ++++
 pkg/kamailio/deb/wheezy/source.lintian-overrides   |    1 +
 pkg/kamailio/deb/wheezy/source/format              |    1 +
 pkg/kamailio/deb/wheezy/watch                      |    3 +
 pkg/kamailio/fedora/17/README                      |   67 +
 pkg/kamailio/fedora/17/kamailio-build.appl         |   49 +
 pkg/kamailio/fedora/17/kamailio.appl               |   42 +
 pkg/kamailio/fedora/17/kamailio.service            |   14 +
 pkg/kamailio/fedora/17/kamailio.spec               | 1328 ++++++++++++++++++++
 pkg/kamailio/fedora/17/kamailio.sysconfig          |   12 +
 pkg/kamailio/fedora/18/README                      |    1 +
 pkg/kamailio/fedora/18/kamailio-build.appl         |   49 +
 pkg/kamailio/fedora/18/kamailio.appl               |   42 +
 pkg/kamailio/fedora/18/kamailio.service            |    1 +
 pkg/kamailio/fedora/18/kamailio.spec               |    1 +
 pkg/kamailio/fedora/18/kamailio.sysconfig          |    1 +
 pkg/kamailio/freebsd/Makefile                      |  201 +++
 pkg/kamailio/freebsd/distinfo                      |    3 +
 pkg/kamailio/freebsd/files/patch-Makefile          |   78 ++
 pkg/kamailio/freebsd/files/patch-Makefile-mysql    |   11 +
 pkg/kamailio/freebsd/files/patch-Makefile.defs     |   42 +
 pkg/kamailio/freebsd/files/pkg-deinstall.in        |   24 +
 pkg/kamailio/freebsd/files/pkg-install.in          |   12 +
 pkg/kamailio/freebsd/pkg-descr                     |   13 +
 pkg/kamailio/gentoo                                |    1 +
 pkg/kamailio/netbsd/COMMENT                        |    1 +
 pkg/kamailio/netbsd/DESCR                          |   18 +
 pkg/kamailio/netbsd/Makefile                       |   42 +
 pkg/kamailio/netbsd/PLIST                          |  120 ++
 pkg/kamailio/netbsd/distinfo                       |    1 +
 pkg/kamailio/openbsd/Makefile                      |  154 +++
 pkg/kamailio/openbsd/distinfo                      |    5 +
 .../openbsd/patches/patch-etc_kamailio_cfg         |   13 +
 .../openbsd/patches/patch-modules_perl_Makefile    |   15 +
 .../openbsd/patches/patch-scripts_kamctlrc         |   12 +
 pkg/kamailio/openbsd/pkg/COMMENT                   |    1 +
 pkg/kamailio/openbsd/pkg/DESCR                     |   18 +
 pkg/kamailio/openbsd/pkg/DESCR-berkeleydb          |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-carrierroute        |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-ldap                |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-main                |    7 +
 pkg/kamailio/openbsd/pkg/DESCR-mysql               |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-perl                |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-postgresql          |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-radius              |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-snmpstats           |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-xcap_client         |    1 +
 pkg/kamailio/openbsd/pkg/DESCR-xmlrpc              |    1 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-berkeleydb   |    2 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-carrierroute |    2 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-ldap         |    3 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-main         |   68 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-mysql        |    2 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-perl         |    3 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-postgresql   |    2 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-radius       |    6 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-snmpstats    |    2 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-xcap_client  |    2 +
 pkg/kamailio/openbsd/pkg/PFRAG.shared-xmlrpc       |    2 +
 pkg/kamailio/openbsd/pkg/PLIST                     |  120 ++
 pkg/kamailio/openbsd/pkg/PLIST-berkeleydb          |   47 +
 pkg/kamailio/openbsd/pkg/PLIST-carrierroute        |    3 +
 pkg/kamailio/openbsd/pkg/PLIST-ldap                |    4 +
 pkg/kamailio/openbsd/pkg/PLIST-main                |  186 +++
 pkg/kamailio/openbsd/pkg/PLIST-mysql               |   32 +
 pkg/kamailio/openbsd/pkg/PLIST-perl                |   30 +
 pkg/kamailio/openbsd/pkg/PLIST-postgresql          |   32 +
 pkg/kamailio/openbsd/pkg/PLIST-radius              |    8 +
 pkg/kamailio/openbsd/pkg/PLIST-snmpstats           |   10 +
 pkg/kamailio/openbsd/pkg/PLIST-xcap_client         |    3 +
 pkg/kamailio/openbsd/pkg/PLIST-xmlrpc              |    3 +
 pkg/kamailio/rpm/kamailio.default                  |   30 +
 pkg/kamailio/rpm/kamailio.init                     |  128 ++
 pkg/kamailio/rpm/kamailio.init.SuSE                |  133 ++
 pkg/kamailio/rpm/kamailio.spec-4.1                 |  403 ++++++
 pkg/kamailio/rpm/kamailio.spec.CenOS               |  742 +++++++++++
 pkg/kamailio/rpm/kamailio.spec.SuSE                |  383 ++++++
 pkg/kamailio/solaris/kamailio-manifest.xml         |   43 +
 pkg/kamailio/solaris/pkginfo                       |    9 +
 pkg/kamailio/solaris/prototype                     |  132 ++
 pkg/ser/deb/debian/changelog                       |  156 +++
 pkg/ser/deb/debian/compat                          |    1 +
 pkg/ser/deb/debian/control                         |  117 ++
 pkg/ser/deb/debian/copyright                       |   19 +
 pkg/ser/deb/debian/cron.d.ex                       |    4 +
 pkg/ser/deb/debian/ex.package.doc-base             |   22 +
 pkg/ser/deb/debian/manpage.1.ex                    |   60 +
 pkg/ser/deb/debian/manpage.sgml.ex                 |  152 +++
 pkg/ser/deb/debian/postinst                        |  182 +++
 pkg/ser/deb/debian/postrm                          |   13 +
 pkg/ser/deb/debian/preinst.ex                      |   44 +
 pkg/ser/deb/debian/prerm                           |   14 +
 pkg/ser/deb/debian/prerm.ex                        |   39 +
 pkg/ser/deb/debian/rules                           |  243 ++++
 pkg/ser/deb/debian/ser-oob.config                  |   81 ++
 pkg/ser/deb/debian/ser-oob.postinst                |  286 +++++
 pkg/ser/deb/debian/ser-oob.postrm                  |    6 +
 pkg/ser/deb/debian/ser-oob.prerm                   |   14 +
 pkg/ser/deb/debian/ser-oob.templates               |  191 +++
 pkg/ser/deb/debian/ser.config                      |   29 +
 pkg/ser/deb/debian/ser.default                     |   44 +
 pkg/ser/deb/debian/ser.examples                    |   15 +
 pkg/ser/deb/debian/ser.init                        |  125 ++
 pkg/ser/deb/debian/ser.templates                   |   59 +
 pkg/ser/deb/debian/shlibs.local                    |    0
 pkg/ser/deb/debian/watch                           |    7 +
 pkg/ser/freebsd/000.ser.sh                         |   24 +
 pkg/ser/freebsd/Makefile                           |   55 +
 pkg/ser/freebsd/distinfo                           |    1 +
 pkg/ser/freebsd/pkg-comment                        |    1 +
 pkg/ser/freebsd/pkg-descr                          |   15 +
 pkg/ser/freebsd/pkg-plist                          |  104 ++
 pkg/ser/gentoo/ChangeLog                           |   78 ++
 pkg/ser/gentoo/Manifest                            |   16 +
 pkg/ser/gentoo/files/ser.confd                     |   16 +
 pkg/ser/gentoo/files/ser.initd                     |   34 +
 pkg/ser/gentoo/metadata.xml                        |    9 +
 pkg/ser/gentoo/sip-router-3.1.5.ebuild             |  250 ++++
 pkg/ser/gentoo/sip-router-3.1.6.ebuild             |  251 ++++
 pkg/ser/gentoo/sip-router-3.2.3.ebuild             |  251 ++++
 pkg/ser/gentoo/sip-router-3.2.4.ebuild             |  251 ++++
 pkg/ser/gentoo/sip-router-3.3.1.ebuild             |  255 ++++
 pkg/ser/gentoo/sip-router-3.3.2.ebuild             |  255 ++++
 pkg/ser/netbsd/COMMENT                             |    1 +
 pkg/ser/netbsd/DESCR                               |   16 +
 pkg/ser/netbsd/Makefile                            |   50 +
 pkg/ser/netbsd/PLIST                               |  102 ++
 pkg/ser/netbsd/distinfo                            |    1 +
 pkg/ser/openbsd/Makefile                           |   54 +
 pkg/ser/openbsd/distinfo                           |    1 +
 pkg/ser/openbsd/pkg/COMMENT                        |    1 +
 pkg/ser/openbsd/pkg/DESCR                          |   15 +
 pkg/ser/openbsd/pkg/PLIST                          |  106 ++
 pkg/ser/opensuse/ser.init.SuSE                     |  136 ++
 pkg/ser/opensuse/ser.spec                          |  333 +++++
 pkg/ser/rpm/ser.init                               |   72 ++
 pkg/ser/rpm/ser.spec-4.1                           |  328 +++++
 pkg/ser/rpm/ser.spec.fedora                        |  296 +++++
 pkg/ser/solaris/pkginfo                            |    9 +
 pkg/ser/solaris/prototype                          |  106 ++
 pkg/ser/suse/ser.init                              |  136 ++
 pkg/ser/suse/ser.spec                              |  341 +++++
 route.c                                            |   12 +-
 rpc_lookup.h                                       |    2 +-
 rvalue.c                                           |    1 +
 tcp_main.c                                         |   11 +
 utils/sercmd/sercmd.c                              |    2 +-
 298 files changed, 20974 insertions(+), 363 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 43955f7..471e3c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,491 @@
+===================== 2014-06-12 Version 4.1.4 Released =====================
+
+===================== Changes Since Version 4.1.3 ===========================
+
+commit d521dff2563ddd1f64fb0c93e7cbd7a6ad254159
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 15:57:57 2014 +0200
+
+    Makefile.defs: version set to 4.1.4
+
+commit a4f11987cd7fcabb68c377a6c61ab4238ec2cecc
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 15:56:58 2014 +0200
+
+    pkg/deb: version set to 4.1.4 in deb specs
+
+commit bd7e64b5c38db50f37bae250911e82808060a262
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 15:53:36 2014 +0200
+
+    pkg: updated version in fedora and centos specs
+
+commit a2bffd8aa6f97c2496c15c26fcb487f514b347de
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 15:51:17 2014 +0200
+
+    pkg/rpm: version set to 4.1.4 in rpm specs
+
+commit b634dbace0d0f8ecf061252423374a24288f9fe2
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 12:12:02 2014 +0200
+
+    acc: clear new parsed headers when evaluating acc attributes
+    
+    - the structures are in pkg, while request is taken from shm clone, can
+      cause reference to the space of another process
+    - reported by Igor Potjevlesch
+    
+    (cherry picked from commit e6c0c2f9871eab5a73371d48dfa24e4ece2512d8)
+
+commit 6c3c5b977941c605aa1be2ce582b3b843dbfcafe
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 11:48:01 2014 +0200
+
+    acc: allow recording to the rest of backends even when setting db table fails
+    
+    - such error doesn't affect radius or custom backends
+    
+    (cherry picked from commit 655711330b2ffd82dc84330ef0e0fbbad82a9160)
+
+commit be8fb6fa8a1492259a26abe4825653f1f66ff0d8
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 11:39:55 2014 +0200
+
+    auth: proper fixup for optional method parameter in pv_www_authenticate()
+    
+    - reported by Muhammad Shahzad
+    
+    (cherry picked from commit dd00819f7cca976e699a20960956abff760df957)
+
+commit b1ab677fe8977656c65112b558661673fdeb9f52
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Jun 12 09:59:44 2014 +0200
+
+    core: sync definition of destroy_rpcs()
+    
+    - reported by Victor Seva
+    
+    (cherry picked from commit 28be6c3c79c02600f03a51b2393b289fbe8c9bd9)
+
+commit fbe73477eae716693a35615df1375dc16d7e65bb
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed Jun 11 17:12:37 2014 +0200
+
+    dialog: execute internal event_route blocks under local_route type
+    
+    - request_route type triggers additional script callbacks that could
+      reset the transaction and can cause crashing
+    - reported by  Nuno Miguel Reis, FS#440
+    
+    (cherry picked from commit 88a9ffee284338d536b6f7e072e5c99b29d983ee)
+
+commit fc7f840a91394d5896d54ad534d8b6c9c61ec553
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Fri May 30 13:34:08 2014 +0200
+
+    core/parse/sdp: proper parsing of a=rtpmap line
+    
+    - error handling when malformed line, avoiding crash to due to invalid
+      offsetting when clockrate is missing
+    - reported by  Michael Ricordeau, FS#435
+    
+    (cherry picked from commit c842bda9dac46724c58b734d092391c79867f2fb)
+
+commit c81c360315105e47f5fdd762ffb6490691c3c675
+Author: Olle E. Johansson <oej at edvina.net>
+Date:   Fri May 30 09:20:49 2014 +0100
+
+    auth_radius: Improve error message to simplify debugging
+    
+    (cherry picked from commit 6e51019b0a2c60178b9ca03b9bb2a5fef49ca7ba)
+
+commit 2f8f293242b7982b1ad843f5bfbcea22bf35027d
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 28 15:47:10 2014 +0200
+
+    pkg/rpm: use pkg memory size when checking config in init script
+    
+    - for large configs, check can fail due to low memory
+    
+    (cherry picked from commit 91a362e2f1bae90e2564491560aff8bad5b04564)
+
+commit 177723a58ee12b3cb239d993a28a063d694f3b02
+Author: Konstantin Mosesov <ez at voipgroup.org.ua>
+Date:   Sat May 24 05:58:19 2014 +0400
+
+    Fixed misstypes and indents in docs.
+    
+    (cherry picked from commit 5bede9a9a77ad01e06d849485d6ce4274eca3fd4)
+
+commit 8375c7f308a812b1e85768a663e039e9f2a70d1e
+Author: Konstantin Mosesov <ez at voipgroup.org.ua>
+Date:   Sat May 24 05:57:16 2014 +0400
+
+    Fixed bug with JAVA_HOME detection.
+    
+    (cherry picked from commit 5a05370f35bdeb7277b2f53f5c3e95fb672d4024)
+
+commit f2afd026ff9509151612c3b180b3d813e95484dc
+Author: Carsten Bock <carsten at ng-voice.com>
+Date:   Thu May 22 21:07:17 2014 +0200
+
+    Core: Bugfix: Do not reset tcp_listeners: We may only listen on TCP.
+    
+    (cherry picked from commit 9b9d15875aa09a5574ff0754309f4f77161d3194)
+
+commit 4267ba4cb15da135d4cd5543fb7f8d5f2f02ef9c
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 21 09:55:46 2014 +0200
+
+    core: allow listening on tls without listening on tcp
+    
+    - reported in FS#425
+    
+    (cherry picked from commit eea7f9d04090a736c8a0f2b2a350c08635cc8e39)
+
+commit 7453f5e3b10b4a257eb2e1e1650bfabc5f381ec5
+Author: Juha Heinanen <jh at tutpro.com>
+Date:   Tue May 20 16:22:58 2014 +0300
+
+    modules/siputils:  generate error message if parsing of is_gruu() uri fails
+    
+    (cherry picked from commit 365a60772de9c1d2f19ecf52b12f6d75b348e996)
+
+commit 93fb970b87216ea5f63b077f02bbe1c085ddc45c
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Tue May 20 09:16:01 2014 +0200
+
+    core: print number of parameters used for searching cfg function
+    
+    (cherry picked from commit a313a8d33afdee6c7eb70cd57161aef8e70c5bcf)
+
+commit a008e0f7d0920d061892819a121d1f07ba4b2a70
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu May 15 12:48:04 2014 +0200
+
+    core: use port 5061 for checking self when uri has transport tls
+    
+    - 5060 was used, failing to match myself condition
+    
+    (cherry picked from commit 2e55d7bd218c9f954da7d289ec1be090bb4d88b0)
+
+commit fdea08a522ed6d1e30b6b8eab0e74bc47078d57d
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu May 15 12:46:14 2014 +0200
+
+    topoh: match on all ports if none is in the uri for checking self
+    
+    - forcing default 5060 can fail for multi-listen case and tls
+    
+    (cherry picked from commit 1d90f4de94dfc887cc6129624fd5e6ad989abd37)
+
+commit a768ffa5a083bbddc35db59b2686046c000c0482
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 23:37:54 2014 +0200
+
+    kamcmd: proper size for memset, based on malloc
+    
+    (cherry picked from commit 7134959725011baa504a027c4561e0054dd907ae)
+
+commit 3c7e14f849884d5d145a7ab9c942acbbc9c5d282
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 23:12:33 2014 +0200
+
+    rls: proper header define guard and check of null returned value
+    
+    (cherry picked from commit 4f2da3e025fa281f88e80bb841a51d6546219ae8)
+
+commit 164b17f8677c3c877ffd697ec5fb40d0d81e12f8
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 23:08:06 2014 +0200
+
+    ipops: free dns pv structure on invalid pv name
+    
+    (cherry picked from commit e53c715c74fb5b58f4f68b81acb60de66b19b8cc)
+
+commit 386ef2f61d18966ceb70916869389f2690e0a6ef
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 23:03:19 2014 +0200
+
+    db_flatstore: free result before returning null on no more pkg
+    
+    - partial allocation when doing an incomplete new connection
+    
+    (cherry picked from commit 74743d6ef3bf74c1226ba5a1b6bebfbe19b06b93)
+
+commit c5c1002be8c4f3e24d1b79b77856db2879b97c72
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 22:56:37 2014 +0200
+
+    core: free previous allocated variable if no more pkg to build rve struct
+    
+    - cleaner shut down if not enough memory at startup
+    
+    (cherry picked from commit ace56c6bd2221920b965185c1c9a5997cd3f2768)
+
+commit 8c47852eff1b42727d56f9791a28525a23b25599
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 22:53:35 2014 +0200
+
+    pv: proper length for line transformation when handling last line of value
+    
+    (cherry picked from commit f1a09e44268c77641216a78878f2c73c6e5a4d66)
+
+commit 12a0a927aa3ad6dfbb18ab3fcf1927bf51098925
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Mon May 12 22:54:54 2014 +0200
+
+    dialog: if sending BYE fails at timeout, unref dialog
+    
+    - destroy dialog structures
+    
+    (cherry picked from commit e39a90e11bfed2b4445c37db1532488aa9e3e725)
+
+commit 3457dc459acd7eba96a0cb77e7d50cfc349c303e
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Sat May 3 21:06:34 2014 +0200
+
+    mem/q_malloc: free old pointer if allocation in realloc fails
+    
+    (cherry picked from commit 8c2888fcd33bee45cb4654222da619e70ed44ecc)
+
+commit ce46f5482f56378beba16c68d1e5af5e5d593008
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Sat May 3 21:03:34 2014 +0200
+
+    mem/f_malloc: free old pointer if allocation in realloc fails
+    
+    (cherry picked from commit 41a37b570758445d723d4d78b9786f8e6cb5722c)
+
+commit 2cfb00b4a24f24cd9462305f4518797706b8f6f1
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Fri May 2 23:58:12 2014 +0200
+
+    mem/f_malloc: check returned pointer for bitmask index
+    
+    - if null, reset slot and search on bigger chunks slots
+    
+    (cherry picked from commit 892a24f7256e60e2a0116655e0052c284479b7d2)
+
+commit 6e17d6e92c1e4b76fbea4b4b5d925ed67e4fdac7
+Author: Carlos Ruiz Diaz <carlos.ruizdiaz at gmail.com>
+Date:   Sun Apr 27 21:22:49 2014 -0500
+
+    cnxcc: fixed deadlock when call gets terminated under certain conditions
+    
+    - fixed some indentation problems introduced by Eclipse IDE
+    
+    (cherry picked from commit d0f0ba702bd44524bc9f52e07341db03267b15f7)
+
+commit 3997dcccf36579442cb92222fe0868accd64b537
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed Jun 11 19:01:17 2014 +0200
+
+    auth: enhanced log message when method param fails to be retrieved
+    
+    (cherry picked from commit 35329870fe22115fd24a396b743e4814278ce46a)
+
+commit 94ebfb5d5973ed59de84ca0e0c87052b4c80f9de
+Author: Torrey Searle <tsearle at gmail.com>
+Date:   Mon Jun 2 19:51:19 2014 +0200
+
+    srdb1: fix memory leak in db-id
+    
+    - When getting an existing connection from the pool, free the newly
+      created db-id as the pool connection already has a reference to the
+      existing one.  Fixes FS#436
+    (cherry picked from commit 69de17d3bb1d032f9a41752362194d718336e20d)
+
+commit 642428cf8be1c7355f91b14276e888ec505cd69a
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Mon May 19 08:56:38 2014 +0200
+
+    dialog: add wait-for-ack callback before response unref
+    
+    - in case of a sipral for ending in a negative response from initial
+      state, ack to second iteration can unref prematurely the dialog
+    - reported by Pawel Sternal, FS#427
+    
+    (cherry picked from commit d81fd1bf067b78b55ad348db2531c4ba9b10dddb)
+
+commit 7bdaca008e1bddbe9ab4db9d70e835ba45f6a5ff
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu May 29 17:06:13 2014 +0200
+
+    pv: safety check for PAI header parsed structure
+    
+    - reported by Igor Potjevlesch
+    
+    (cherry picked from commit e633ca6b7e748a77825d3208e86bf9bce18944a5)
+
+commit ad5235229f59ba5d1f4216e144291e110fee0211
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 23:28:24 2014 +0200
+
+    parser/sdp: assign stream var only if session is not null
+    
+    (cherry picked from commit 1cefc0c5f83eb4b7b6ffefc6ab383d7aae6de07f)
+
+commit 5cd3bd3a1bbcc9edffe31c0b1fdf11da43023b2c
+Author: Hugh Waite <hugh.waite at acision.com>
+Date:   Tue May 27 15:42:08 2014 +0100
+
+    rls: Fix memory leak with duplicate entries in lists
+    
+    - When duplicate detection is requested, free the string and container
+    - When duplicate detection is not requested, insert the duplicate anyway
+
+commit af4f84b84ca7601bd8124fe2e82d0718c7975313
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Tue May 27 12:07:42 2014 +0200
+
+    db_mysql: proper handling of mysql_next_result(...) return code
+    
+    - it indicates the presence of another result if return is 0
+    - reported by  Maxim (simax), FS#434
+    
+    (cherry picked from commit 37f0964278e925d5530563b38c82a57de1f7fa59)
+
+commit 9a697d04e7bb041e1ec6748727a418866dc0ba54
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Mon May 26 14:47:37 2014 +0200
+
+    auth_db: auth_check() to get the auth header from the used api
+    
+    - this avoids using a different auth header that might be in the request
+      before checking usernames in from/to headers against auth user
+    
+    (cherry picked from commit 4992519eed88d94847d742c52e882082b1b41264)
+
+commit 47a00936695c46176c3c047e0ab141b4127d08dc
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Sun May 18 19:07:38 2014 +0200
+
+    mtree: replace tree structure even there are no records in db table
+    
+    - reload didn't replaced old tree if no records in db table
+    - reported by Juha Heinanen
+    
+    (cherry picked from commit c36f326d3c7372b149592d438df75f3d7b0a0233)
+
+commit f44415eee52d5c17a9b6c5e16175bd84455e9867
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu May 15 13:59:03 2014 +0200
+
+    siputils: allocate enough space to hold ending zero for tel uri in tel2sip()
+    
+    - reported by Juha Heinanen
+    
+    (cherry picked from commit 7992a2b8d42bb7e8bcf1738cf042013ed126a47a)
+
+commit 9c15e8444e99f33ca2f0c920d3cbb846d407f596
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed May 14 09:58:50 2014 +0200
+
+    presence_dialoginfo: get rid of unused variables warning
+    
+    - priority and winning_priority are used in an alternative winning node
+      selection which is disabled now
+    - reported by Jua Heinanen
+    
+    (cherry picked from commit 4f4641ea2a4018a72558c40d4878e9af7053be2d)
+
+commit 402e2122d1aa353ee8c10321aa1eb9315a81cd81
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed Apr 16 19:43:45 2014 +0200
+
+    db_mysql: properly free db result structure if db_mysql_convert_result() fails
+    
+    - reported by Torrey Searle, FS#420
+    
+    (cherry picked from commit 37983c9f57536c57c5d34ce2d8a1c8f411e61e39)
+
+commit 74c1bd884ec2a3418dee3cbf358ab8bb7e899d7a
+Author: Vitaliy Aleksandrov <vitalik.voip at gmail.com>
+Date:   Thu May 8 15:01:02 2014 +0100
+
+    websocket: Fix crash in websocket module
+    
+    - Avoid race condition by maintaining a connection reference count
+    - Fixes FS#406
+
+commit cc4a7c67f24d105a119ea492ce53f017369af296
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu May 8 08:40:28 2014 +0200
+
+    presence_dialoginfo: interetate through all 'dialog' nodes of xml document
+    
+    - PUBLISH request can carry info for many dialogs
+    - reported and patch by Klaus Feichtinger
+    
+    (cherry picked from commit 7a827a612f93b9dd938f9b78c0de3ac2d98a0c77)
+
+commit b76eb77a36a5e751d792cb7e0d60f4750976e322
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Fri May 2 21:50:14 2014 +0200
+
+    dialog: copy dlg var value locally on get operation
+    
+    - reference to shared memory exposes risk on accessing an invalid
+      pointer if anothe process updates it
+    - reported by Dragos Oancea
+    
+    (cherry picked from commit bb3eed8aabea9f63c9922f71714aea242771db02)
+
+commit c5781b28cd92360cf163a84312fa72c08c4737b5
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Tue Apr 29 20:02:19 2014 +0200
+
+    rtmier: reset avps and xavp lists after route blocks execution
+    
+    - avoid leaks if someone is using avp/xavp with rtimer - there is a fake
+      message used there, thus not the normal sip message routing that
+      resets avps/xavps
+    
+    (cherry picked from commit 159978cf2a98748f3225155d8946bcbd768b51e3)
+
+commit 4455a13e8d31416dc44af455710fd7a7ff37ec11
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Mon Apr 28 13:51:56 2014 +0200
+
+    acc: no request is needed for setting end time on dialog termination
+    
+    - callback function cdr_on_end() doesn't use it at all
+    - reported by Eduardo Lejarreta, FS#256
+    
+    (cherry picked from commit 8fcdd23aaa49cb6c1ecb34c4c6b4a88078a860f7)
+
+commit 70f1b7479f80ca4f5e3a45fcf772785c110d0b57
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Wed Apr 30 21:46:55 2014 +0200
+
+    core: compute the len for dns srv name
+    
+    - fixes dns srv for cache, reported by Rob Eijgenraam, FS#426
+    
+    (cherry picked from commit b834cde74f8a4b41ec24ceb8332adff8bb3922bb)
+
+commit a9a3cebc7688dcaea7539c067c4b1bf3463040ce
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Thu Apr 24 18:02:34 2014 +0200
+
+    drouting: removed old contraint on route index
+    
+    (cherry picked from commit c3386295d7607a58d37a65b6822bf5f98b3fefa0)
+
+commit ee692ab89f1321ccfb24316c30fce5a90e6a9764
+Author: Daniel-Constantin Mierla <miconda at gmail.com>
+Date:   Mon Apr 28 09:51:42 2014 +0200
+
+    pipelimit: run timer at 1000ms
+    
+    - proper execution on timer_interval
+    - reported by Julia <juliabo at gmail.com>
+    
+    (cherry picked from commit f9d95734ba7c04a0188077914161395c2e94f3eb)
+
+
 ===================== 2014-04-24 Version 4.1.3 Released =====================
 
 ===================== Changes Since Version 4.1.2 ===========================
diff --git a/Makefile.defs b/Makefile.defs
index e765487..d5ff2bc 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -164,7 +164,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
 # version number
 VERSION = 4
 PATCHLEVEL = 1
-SUBLEVEL = 3
+SUBLEVEL = 4
 EXTRAVERSION =
 
 # memory manager switcher
diff --git a/autover.h b/autover.h
index 2b5882b..7eccd07 100644
--- a/autover.h
+++ b/autover.h
@@ -2,6 +2,6 @@
  * DO NOT EDIT IT
  */
 
-#define REPO_VER "236326"
-#define REPO_HASH "236326"
+#define REPO_VER "39adca"
+#define REPO_HASH "39adca"
 #define REPO_STATE ""
diff --git a/cfg.y b/cfg.y
index 195593b..04326e0 100644
--- a/cfg.y
+++ b/cfg.y
@@ -3269,7 +3269,8 @@ cmd:
 					LOG(L_ERR, "misused command %s\n", $1);
 					yyerror("Command cannot be used in the block\n");
 			} else {
-				LOG(L_ERR, "cfg. parser: failed to find command %s\n", $1);
+				LOG(L_ERR, "cfg. parser: failed to find command %s (params %ld)\n",
+						$1, mod_func_action->val[1].u.number);
 				yyerror("unknown command, missing loadmodule?\n");
 			}
 			free_mod_func_action(mod_func_action);
diff --git a/dns_cache.c b/dns_cache.c
index 7465c83..029b445 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -2656,7 +2656,6 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
 	struct hostent* he;
 	struct ip_addr* ip;
 	static char tmp[MAX_DNS_NAME]; /* tmp. buff. for SRV lookups */
-	int len;
 	str srv_name;
 	char srv_proto;
 
@@ -2664,7 +2663,6 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
 		/* not init or off => use normal, non-cached version */
 		return _sip_resolvehost(name, port, proto);
 	}
-	len=0;
 	if (proto){ /* makes sure we have a protocol set*/
 		if (*proto==0)
 			*proto=srv_proto=PROTO_UDP; /* default */
@@ -2708,7 +2706,7 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
 			}
 
 			srv_name.s=tmp;
-			srv_name.len=len;
+			srv_name.len=strlen(tmp);
 			if ((he=dns_srv_get_he(&srv_name, port, dns_flags))!=0)
 				return he;
 		}
diff --git a/forward.h b/forward.h
index 4680a8e..f377546 100644
--- a/forward.h
+++ b/forward.h
@@ -84,6 +84,8 @@ inline static struct socket_info* get_send_socket(struct sip_msg* msg,
 }
 
 
+#define GET_URI_PORT(uri) ((uri)->port_no?(uri)->port_no:(((uri)->proto==PROTO_TLS)?SIPS_PORT:SIP_PORT))
+
 struct socket_info* get_out_socket(union sockaddr_union* to, int proto);
 typedef int (*check_self_f)(str* host, unsigned short port,
 		unsigned short proto);
diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
index 3eea708..f717464 100644
--- a/lib/srdb1/db.c
+++ b/lib/srdb1/db.c
@@ -325,6 +325,8 @@ db1_con_t* db_do_init2(const str* url, void* (*new_connection)(), db_pooling_t p
 		pool_insert((struct pool_con*)con);
 	} else {
 		LM_DBG("connection %p found in pool\n", id);
+		free_db_id(id); // free the new id, as we use the pool instead
+		id = 0;
 	}
 
 	res->tail = (unsigned long)con;
diff --git a/main.c b/main.c
index 05d431e..d8a3f89 100644
--- a/main.c
+++ b/main.c
@@ -1785,6 +1785,18 @@ static int calc_proc_no(void)
 			 tcp_e_listeners = tcp_cfg_children_no;
 	}
 	tcp_listeners += tcp_e_listeners;
+#ifdef USE_TLS
+	tcp_e_listeners = 0;
+	for (si=tls_listen, tcp_e_listeners=0; si; si=si->next) {
+		if(si->workers>0)
+			tcp_listeners += si->workers;
+		else {
+			if(tcp_listeners==0)
+				tcp_e_listeners = tcp_cfg_children_no;
+		}
+	}
+	tcp_listeners += tcp_e_listeners;
+#endif
 	tcp_children_no = tcp_listeners;
 #endif
 #ifdef USE_SCTP
diff --git a/mem/f_malloc.c b/mem/f_malloc.c
index 7a0e115..73918cf 100644
--- a/mem/f_malloc.c
+++ b/mem/f_malloc.c
@@ -375,9 +375,17 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
 	if (likely(hash>=0)){
 		if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) { /* return first match */
 			f=&(qm->free_hash[hash].first);
-			goto found;
+			if(likely(*f)) goto found;
+#ifdef DBG_F_MALLOC
+			MDBG(" block %p hash %d empty but no. is %lu\n", qm,
+					hash, qm->free_hash[hash].no);
+#endif
+			/* reset slot and try next hash */
+			qm->free_hash[hash].no=0;
+			fm_bmp_reset(qm, hash);
+			hash++;
 		}
-		/* if we are here we are searching for a "big" fragment
+		/* if we are here we are searching next hash slot or a "big" fragment
 		   between F_MALLOC_OPTIMIZE/ROUNDTO+1
 		   and F_MALLOC_OPTIMIZE/ROUNDTO + (32|64) - F_MALLOC_OPTIMIZE_FACTOR
 		   => 18 hash buckets on 32 bits and 50 buckets on 64 bits
@@ -692,12 +700,12 @@ void* fm_realloc(struct fm_block* qm, void* p, unsigned long size)
 			if (ptr){
 				/* copy, need by libssl */
 				memcpy(ptr, p, orig_size);
+			}
 	#ifdef DBG_F_MALLOC
-				fm_free(qm, p, file, func, line);
+			fm_free(qm, p, file, func, line);
 	#else
-				fm_free(qm, p);
+			fm_free(qm, p);
 	#endif
-			}
 			p=ptr;
 		}
 	}else{
diff --git a/mem/q_malloc.c b/mem/q_malloc.c
index 8c36d03..ad0eaaa 100644
--- a/mem/q_malloc.c
+++ b/mem/q_malloc.c
@@ -653,12 +653,12 @@ void* qm_realloc(struct qm_block* qm, void* p, unsigned long size)
 				if (ptr){
 					/* copy, need by libssl */
 					memcpy(ptr, p, orig_size);
+				}
 	#ifdef DBG_QM_MALLOC
-					qm_free(qm, p, file, func, line);
+				qm_free(qm, p, file, func, line);
 	#else
-					qm_free(qm, p);
+				qm_free(qm, p);
 	#endif
-				}
 				p=ptr;
 			}
 	}else{
diff --git a/modules/acc/acc_cdr.c b/modules/acc/acc_cdr.c
index 68792e9..3cab762 100644
--- a/modules/acc/acc_cdr.c
+++ b/modules/acc/acc_cdr.c
@@ -569,7 +569,7 @@ static void cdr_on_end( struct dlg_cell* dialog,
                         int type,
                         struct dlg_cb_params* params)
 {
-    if( !dialog || !params || !params->req)
+    if( !dialog || !params)
     {
         LM_ERR("invalid values\n!");
         return;
diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c
index 18437fc..fa6cd8c 100644
--- a/modules/acc/acc_logic.c
+++ b/modules/acc/acc_logic.c
@@ -426,6 +426,7 @@ static inline void acc_onreply( struct cell* t, struct sip_msg *req,
 {
 	str new_uri_bk;
 	int br = -1;
+	hdr_field_t *hdr;
 
 	/* acc_onreply is bound to TMCB_REPLY which may be called
 	   from _reply, like when FR hits; we should not miss this
@@ -466,9 +467,9 @@ static inline void acc_onreply( struct cell* t, struct sip_msg *req,
 	if (is_db_acc_on(req)) {
 		if(acc_db_set_table_name(req, db_table_acc_data, &db_table_acc)<0) {
 			LM_ERR("cannot set acc db table name\n");
-			return;
+		} else {
+			acc_db_request(req);
 		}
-		acc_db_request(req);
 	}
 #endif
 #ifdef RAD_ACC
@@ -488,6 +489,19 @@ static inline void acc_onreply( struct cell* t, struct sip_msg *req,
 		req->new_uri = new_uri_bk;
 		req->parsed_uri_ok = 0;
 	}
+
+	/* free header's parsed structures that were added by resolving acc attributes */
+	for( hdr=req->headers ; hdr ; hdr=hdr->next ) {
+		if ( hdr->parsed && hdr_allocs_parse(hdr) &&
+		(hdr->parsed<(void*)t->uas.request ||
+		hdr->parsed>=(void*)t->uas.end_request)) {
+			/* header parsed filed doesn't point inside uas.request memory
+			 * chunck -> it was added by resolving acc attributes -> free it as pkg */
+			DBG("removing hdr->parsed %d\n", hdr->type);
+			clean_hdr_field(hdr);
+			hdr->parsed = 0;
+		}
+	}
 }
 
 
diff --git a/modules/app_java/Makefile b/modules/app_java/Makefile
index 68b8f8a..792a116 100644
--- a/modules/app_java/Makefile
+++ b/modules/app_java/Makefile
@@ -20,6 +20,15 @@ JAVA_HOME ?= $(shell readlink -f /usr/bin/javac | sed "s:bin/javac::")
 DEFS += $(shell pkg-config libgcj12 --cflags) -I$(JAVA_HOME)/include
 LIBS += $(shell pkg-config libgcj12 --libs) -L$(JAVA_HOME)/lib  -ljvm
 
+# On Debian 7.5 there is a bug with JAVA_HOME detection.
+# $(shell readlink -f /usr/bin/javac | sed "s:bin/javac::") points to perl wrapper script (/usr/bin/gcj-wrapper-4.7)
+# whereas the real compiler is at /usr/bin/gcj-4.7. As the result, JAVA_HOME will not be a directory, that is incorrect.
+# At this point I don't see any universal method as explicit setting this variable at the compile phase.
+# -- ez
+ifeq ($(shell [ -d "${JAVA_HOME}" -a -f "$(JAVA_HOME)/include/jni.h" -a -f "$(JAVA_HOME)/lib/libjvm.so" ] && echo 1 || echo 0),0)
+    $(error Can't locate Java Development Kit. You have to specify environment JAVA_HOME to build app_java)
+endif
+
 ifeq ($(OS), freebsd)
 LIBS+=-pthread
 endif
diff --git a/modules/app_java/doc/app_java.xml b/modules/app_java/doc/app_java.xml
index 0360392..17800cc 100644
--- a/modules/app_java/doc/app_java.xml
+++ b/modules/app_java/doc/app_java.xml
@@ -6,7 +6,6 @@
 <!-- Include general documentation entities -->
 <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
 %docentities;
-
 ]>
 
 <book xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -15,8 +14,8 @@
 	<productname class="trade">&kamailioname;</productname>
 	<authorgroup>
 	    <author>
-			<firstname>Konstantin</firstname>
-			<surname>Mosesov</surname>
+		<firstname>Konstantin</firstname>
+		<surname>Mosesov</surname>
 	    </author>
 	    <editor>
 	    	<firstname>Konstantin</firstname>
@@ -25,11 +24,12 @@
 	</authorgroup>
 	<copyright>
 	    <year>2013</year>
-		<holder>Konstantin Mosesov</holder>
+	    <year>2014</year>
+	    <holder>Konstantin Mosesov</holder>
 	</copyright>
     </bookinfo>
     <toc></toc>
     
-	<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="app_java_admin.xml"/>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="app_java_admin.xml"/>
     
 </book>
diff --git a/modules/app_java/doc/app_java_admin.xml b/modules/app_java/doc/app_java_admin.xml
index f69f8ee..43f9fa1 100644
--- a/modules/app_java/doc/app_java_admin.xml
+++ b/modules/app_java/doc/app_java_admin.xml
@@ -88,8 +88,8 @@
 	<section>
 		<title>Java runtime</title>
 		<section>
-			<title/>
-			<para>Java runtime library (JRE or JDK) is required to use this module.</para>
+			<title>JRE or JDK is required to use this module</title>
+			<para>Java runtime library (JRE and JDK for building app_java) is required to use this module.</para>
 		</section>
 	</section>
 	<!-- end of section Java Runtime -->
@@ -166,7 +166,9 @@ modparam("app_java", "java_options", "-Djava.compiler=NONE")
 				<programlisting format="linespecific">
 ...
 # Assumes "application java folder" is located at /opt/kamailio/java
-modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+modparam("app_java", "java_options", "-Djava.compiler=NONE 
+    -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:
+    /opt/kamailio/java/kamailio.jar")
 ...
 </programlisting>
 			</example>
@@ -175,7 +177,9 @@ modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/pa
 				<programlisting format="linespecific">
 ...
 # Assumes "application java folder" is located at /opt/kamailio/java
-modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+modparam("app_java", "java_options", "-verbose:gc,class,jni 
+    -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:
+    /opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
 ...
 </programlisting>
 			</example>
@@ -184,7 +188,9 @@ modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE
 				<programlisting format="linespecific">
 ...
 # Assumes "application java folder" is located at /opt/kamailio/java
-modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni 
+    -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:
+    /opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
 ...
 </programlisting>
 			</example>
@@ -240,7 +246,8 @@ modparam("app_java", "force_cmd_exec", 1)
 		object       L 
 		short        S 
 		void         V 
-		Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
+		Note that to specify an object, the "L" is followed by the 
+		object's class name and ends with a semi-colon, ';' .
     			</programlisting>
 			</para>
     		<para> app_java supports the following signatures:
@@ -263,7 +270,8 @@ modparam("app_java", "force_cmd_exec", 1)
 	Parameters are optional, ommitting a parameter meant the passed value is NULL.
 	Parameters count should be exactly the same as signature count.
 	Note 1: Arrays representation (symbol '[') is not supported yet.
-	Note 2: You shall use a correct signature, e.g. the following examples of combinations are invalid:    
+	Note 2: You shall use a correct signature, e.g. the following examples of
+	combinations are invalid:
     	java_method_exec("ExampleMethod", "ZI", "False");
         java_method_exec("ExampleMethod", "LI", "something", "5");
 </programlisting>
@@ -293,8 +301,8 @@ java_method_exec("ExampleMethod", "V");
 # Java
 public int ExampleMethod()
 {
-		... do something;
-		return 1;
+    ... do something;
+    return 1;
 }
 </programlisting>
 			    	</example>
@@ -316,8 +324,8 @@ java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
 # Java
 public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
 {
-		... do something with buffer;
-		return 1;
+    ... do something with buffer;
+    return 1;
 }
 </programlisting>
 	    			</example>
@@ -339,11 +347,12 @@ java_method_exec("ExampleMethod", "ZB", "true", "0x05");
 # Java
 public int ExampleMethod(boolean flagSet, byte bFlag);
 {
-		if (flagSet)
-		{
-			... do something with flags;
-		}
-		return 1;
+    if (flagSet)
+    {
+        ... do something with flags;
+    }
+
+    return 1;
 }
 </programlisting>
     				</example>
@@ -373,8 +382,8 @@ java_staticmethod_exec("ExampleMethod", "V");
 # Java
 public static int ExampleMethod()
 {
-		... do something;
-		return 1;
+    ... do something;
+    return 1;
 }
 </programlisting>
     				</example>
@@ -396,8 +405,8 @@ java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
 # Java
 public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
 {
-		... do something with buffer;
-		return 1;
+    ... do something with buffer;
+    return 1;
 }
 </programlisting>
     				</example>
@@ -419,11 +428,12 @@ java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
 # Java
 public static int ExampleMethod(boolean flagSet, byte bFlag);
 {
-		if (flagSet)
-		{
-			... do something with flags;
-		}
-		return 1;
+    if (flagSet)
+    {
+        ... do something with flags;
+    }
+
+    return 1;
 }
 </programlisting>
     				</example>
@@ -454,8 +464,8 @@ java_s_method_exec("ExampleMethod", "V");
 # Java
 public synchronized int ExampleMethod()
 {
-		... do something;
-		return 1;
+    ... do something;
+    return 1;
 }
 </programlisting>
     				</example>
@@ -477,8 +487,8 @@ java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
 # Java
 public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
 {
-		... do something with buffer;
-		return 1;
+    ... do something with buffer;
+    return 1;
 }
 </programlisting>
     				</example>
@@ -500,11 +510,12 @@ java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
 # Java
 public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
 {
-		if (flagSet)
-		{
-			... do something with flags;
-		}
-		return 1;
+    if (flagSet)
+    {
+        ... do something with flags;
+    }
+
+    return 1;
 }
 </programlisting>
     				</example>
@@ -535,8 +546,8 @@ java_s_staticmethod_exec("ExampleMethod", "V");
 # Java
 public static synchronized int ExampleMethod()
 {
-		... do something;
-		return 1;
+    ... do something;
+    return 1;
 }
 </programlisting>
     				</example>
@@ -558,8 +569,8 @@ java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
 # Java
 public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
 {
-		... do something with buffer;
-		return 1;
+    ... do something with buffer;
+    return 1;
 }
 </programlisting>
     				</example>
@@ -581,11 +592,12 @@ java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
 # Java
 public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
 {
-		if (flagSet)
-		{
-			... do something with flags;
-		}
-		return 1;
+    if (flagSet)
+    {
+        ... do something with flags;
+    }
+
+    return 1;
 }
 </programlisting>
     				</example>
@@ -616,25 +628,25 @@ import org.siprouter.NativeInterface.*;
 
 public class Kamailio extends NativeMethods
 {
-		/* Here you should specify a full path to app_java.so */
-		static
-		{
-				System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
-		}
-
-		/* Constructor. Do not remove !!! */
-		public Kamailio()
-		{
-		}
-
-		/*
-		This method should be executed for each children process, immediately after forking.
-		Required. Do not remove !!!
-		*/
-		public int child_init(int rank)
-		{
-				return 1;
-		}
+    /* Here you should specify a full path to app_java.so */
+    static
+    {
+        System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+    }
+
+    /* Constructor. Do not remove !!! */
+    public Kamailio()
+    {
+    }
+
+    /*
+        This method should be executed for each children process, immediately after forking.
+	Required. Do not remove !!!
+    */
+    public int child_init(int rank)
+    {
+	return 1;
+    }
 }
 </programlisting>
     		</example>
diff --git a/modules/auth/auth_mod.c b/modules/auth/auth_mod.c
index cdfe459..e0ed083 100644
--- a/modules/auth/auth_mod.c
+++ b/modules/auth/auth_mod.c
@@ -687,7 +687,7 @@ static int pv_www_authenticate2(struct sip_msg *msg, char* realm,
 	}
 
 	if (get_str_fparam(&smethod, msg, (fparam_t*)method) < 0) {
-		LM_ERR("failed to get method value\n");
+		LM_ERR("failed to get method value from msg %p var %p\n", msg, method);
 		goto error;
 	}
 
@@ -830,6 +830,7 @@ static int fixup_pv_auth(void **param, int param_no)
 	switch(param_no) {
 		case 1:
 		case 2:
+		case 4:
 			return fixup_var_pve_str_12(param, 1);
 		case 3:
 			return fixup_var_int_12(param, 1);
diff --git a/modules/auth_db/authorize.c b/modules/auth_db/authorize.c
index cf97a8f..e2b0f4f 100644
--- a/modules/auth_db/authorize.c
+++ b/modules/auth_db/authorize.c
@@ -223,10 +223,10 @@ static int generate_avps(struct sip_msg* msg, db1_res_t* db_res)
 
 
 /*
- * Authorize digest credentials
+ * Authorize digest credentials and set the pointer to used hdr
  */
-static int digest_authenticate(struct sip_msg* msg, str *realm,
-				str *table, hdr_types_t hftype, str *method)
+static int digest_authenticate_hdr(sip_msg_t* msg, str *realm,
+				str *table, hdr_types_t hftype, str *method, hdr_field_t **ahdr)
 {
 	char ha1[256];
 	int res;
@@ -277,6 +277,7 @@ static int digest_authenticate(struct sip_msg* msg, str *realm,
 	}
 
 	cred = (auth_body_t*)h->parsed;
+	if(ahdr!=NULL) *ahdr = h;
 
 	res = get_ha1(&cred->digest.username, realm, table, ha1, &result);
 	if (res < 0) {
@@ -315,6 +316,15 @@ end:
 	return ret;
 }
 
+/*
+ * Authorize digest credentials
+ */
+static int digest_authenticate(sip_msg_t* msg, str *realm,
+				str *table, hdr_types_t hftype, str *method)
+{
+	return digest_authenticate_hdr(msg, realm, table, hftype, method, NULL);
+}
+
 
 /*
  * Authenticate using Proxy-Authorize header field
@@ -475,15 +485,15 @@ int auth_check(struct sip_msg* _m, char* _realm, char* _table, char *_flags)
 	LM_DBG("realm [%.*s] table [%.*s] flags [%d]\n", srealm.len, srealm.s,
 			stable.len,  stable.s, iflags);
 
+	hdr = NULL;
 	if(_m->REQ_METHOD==METHOD_REGISTER)
-		ret = digest_authenticate(_m, &srealm, &stable, HDR_AUTHORIZATION_T,
-						&_m->first_line.u.request.method);
+		ret = digest_authenticate_hdr(_m, &srealm, &stable, HDR_AUTHORIZATION_T,
+						&_m->first_line.u.request.method, &hdr);
 	else
-		ret = digest_authenticate(_m, &srealm, &stable, HDR_PROXYAUTH_T,
-						&_m->first_line.u.request.method);
+		ret = digest_authenticate_hdr(_m, &srealm, &stable, HDR_PROXYAUTH_T,
+						&_m->first_line.u.request.method, &hdr);
 
-	if(ret==AUTH_OK && (iflags&AUTH_CHECK_ID_F)) {
-		hdr = (_m->proxy_auth==0)?_m->authorization:_m->proxy_auth;
+	if(ret==AUTH_OK && hdr!=NULL && (iflags&AUTH_CHECK_ID_F)) {
 		srealm = ((auth_body_t*)(hdr->parsed))->digest.username.user;
 			
 		if((furi=parse_from_uri(_m))==NULL)
diff --git a/modules/auth_radius/sterman.c b/modules/auth_radius/sterman.c
index be4dcf3..93cd416 100644
--- a/modules/auth_radius/sterman.c
+++ b/modules/auth_radius/sterman.c
@@ -409,7 +409,7 @@ int radius_authorize_sterman(struct sip_msg* _msg, dig_cred_t* _cred, str* _meth
                         goto err;
                 }
 #endif 
-		LM_ERR("authorization failed\n");
+		LM_ERR("authorization failed. RC auth returned %d\n", i);
 	}
 
  err:
diff --git a/modules/cnxcc/cnxcc_check.c b/modules/cnxcc/cnxcc_check.c
index eb58899..a5b7c93 100644
--- a/modules/cnxcc/cnxcc_check.c
+++ b/modules/cnxcc/cnxcc_check.c
@@ -36,18 +36,17 @@ extern data_t _data;
 void check_calls_by_money(unsigned int ticks, void *param)
 {
 	struct str_hash_entry *h_entry 	= NULL,
-						  *tmp		= NULL;
-	call_t *tmp_call				= NULL;
+			  *tmp		= NULL;
+	call_t *tmp_call		= NULL;
 	int i;
 
 	lock_get(&_data.money.lock);
-
 	if (_data.money.credit_data_by_client->table)
 		for(i = 0; i < _data.money.credit_data_by_client->size; i++)
 			clist_foreach_safe(&_data.money.credit_data_by_client->table[i], h_entry, tmp, next)
 			{
 				credit_data_t *credit_data	= (credit_data_t *) h_entry->u.p;
-				call_t *call				= NULL;
+				call_t *call			= NULL;
 				double total_consumed_money	= 0;
 
 				if (i > SAFE_ITERATION_THRESHOLD)
@@ -55,7 +54,6 @@ void check_calls_by_money(unsigned int ticks, void *param)
 					LM_ERR("Too many iterations for this loop: %d", i);
 					break;
 				}
-
 				lock_get(&credit_data->lock);
 
 				clist_foreach_safe(credit_data->call_list, call, tmp_call, next)
@@ -65,7 +63,7 @@ void check_calls_by_money(unsigned int ticks, void *param)
 					if (!call->confirmed)
 						continue;
 
-					consumed_time 				= get_current_timestamp() - call->start_timestamp;
+					consumed_time 		= get_current_timestamp() - call->start_timestamp;
 
 					if (consumed_time > call->money_based.initial_pulse)
 					{
@@ -91,7 +89,7 @@ void check_calls_by_money(unsigned int ticks, void *param)
 																			call->consumed_amount
 																			);
 				}
-
+				
 				if (credit_data->concurrent_calls == 0)
 				{
 					lock_release(&credit_data->lock);
@@ -107,9 +105,10 @@ void check_calls_by_money(unsigned int ticks, void *param)
 
 				if (credit_data->consumed_amount >= credit_data->max_amount)
 				{
+					lock_release(&_data.money.lock);
 					terminate_all_calls(credit_data);
 					lock_release(&credit_data->lock);
-					break;
+					return;
 				}
 
 				lock_release(&credit_data->lock);
@@ -121,8 +120,8 @@ void check_calls_by_money(unsigned int ticks, void *param)
 void check_calls_by_time(unsigned int ticks, void *param)
 {
 	struct str_hash_entry *h_entry 	= NULL,
-						  *tmp		= NULL;
-	call_t *tmp_call				= NULL;
+			*tmp		= NULL;
+	call_t *tmp_call		= NULL;
 	int i;
 
 	lock_get(&_data.time.lock);
@@ -132,7 +131,7 @@ void check_calls_by_time(unsigned int ticks, void *param)
 			clist_foreach_safe(&_data.time.credit_data_by_client->table[i], h_entry, tmp, next)
 			{
 				credit_data_t *credit_data	= (credit_data_t *) h_entry->u.p;
-				call_t *call				= NULL;
+				call_t *call			= NULL;
 				int total_consumed_secs		= 0;
 
 				lock_get(&credit_data->lock);
@@ -150,8 +149,8 @@ void check_calls_by_time(unsigned int ticks, void *param)
 					if (!call->confirmed)
 						continue;
 
-					call->consumed_amount		= get_current_timestamp() - call->start_timestamp;
-					total_consumed_secs			+= call->consumed_amount;
+					call->consumed_amount	= get_current_timestamp() - call->start_timestamp;
+					total_consumed_secs	+= call->consumed_amount;
 
 					if (call->consumed_amount > call->max_amount)
 					{
@@ -180,10 +179,11 @@ void check_calls_by_time(unsigned int ticks, void *param)
 																									(int) credit_data->max_amount);
 
 				if (credit_data->consumed_amount >= credit_data->max_amount)
-				{
+				{				
+					lock_release(&_data.time.lock);
 					terminate_all_calls(credit_data);
 					lock_release(&credit_data->lock);
-					break;
+					return;
 				}
 
 				lock_release(&credit_data->lock);
diff --git a/modules/cnxcc/cnxcc_mod.c b/modules/cnxcc/cnxcc_mod.c
index 808df1f..22330cc 100644
--- a/modules/cnxcc/cnxcc_mod.c
+++ b/modules/cnxcc/cnxcc_mod.c
@@ -68,12 +68,12 @@
 
 MODULE_VERSION
 
-#define HT_SIZE						229
-#define MODULE_NAME					"cnxcc"
-#define NUMBER_OF_TIMERS			2
+#define HT_SIZE			229
+#define MODULE_NAME		"cnxcc"
+#define NUMBER_OF_TIMERS	2
 
-#define TRUE						1
-#define FALSE						0
+#define TRUE			1
+#define FALSE			0
 
 data_t _data;
 struct dlg_binds _dlgbinds;
@@ -154,7 +154,7 @@ static cmd_export_t cmds[] =
 
 static param_export_t params[] =
 {
-	{"dlg_flag",  				INT_PARAM,			&_data.ctrl_flag	},
+	{"dlg_flag",  			INT_PARAM,			&_data.ctrl_flag	},
 	{"credit_check_period",  	INT_PARAM,			&_data.check_period	},
 	{ 0, 0, 0 }
 };
@@ -198,17 +198,17 @@ select_row_t sel_declaration[] = {
 struct module_exports exports =
 {
 	MODULE_NAME,
-	DEFAULT_DLFLAGS, 	/* dlopen flags */
+	DEFAULT_DLFLAGS,/* dlopen flags */
 	cmds,
 	params,
-	0,          		/* exported statistics */
-	0, 		    		/* exported MI functions */
-	mod_pvs,  			/* exported pseudo-variables */
-	0,          		/* extra processes */
-	mod_init,   		/* module initialization function */
+	0,          	/* exported statistics */
+	0, 	    	/* exported MI functions */
+	mod_pvs,	/* exported pseudo-variables */
+	0,          	/* extra processes */
+	mod_init,   	/* module initialization function */
 	0,
 	0,
-	child_init          /* per-child init function */
+	child_init	/* per-child init function */
 };
 
 static int fixup_par(void** param, int param_no)
@@ -261,7 +261,7 @@ static int mod_init(void)
 	_data.channel.credit_data_by_client	= shm_malloc(sizeof(struct str_hash_table));
 	_data.channel.call_data_by_cid 		= shm_malloc(sizeof(struct str_hash_table));
 
-	_data.stats							= (stats_t *) shm_malloc(sizeof(stats_t));
+	_data.stats				= (stats_t *) shm_malloc(sizeof(stats_t));
 
 	if (!_data.stats)
 	{
@@ -269,9 +269,9 @@ static int mod_init(void)
 		return -1;
 	}
 
-	_data.stats->active		= 0;
+	_data.stats->active	= 0;
 	_data.stats->dropped	= 0;
-	_data.stats->total		= 0;
+	_data.stats->total	= 0;
 
 	if (init_hashtable(_data.time.credit_data_by_client) != 0)
 		return -1;
@@ -336,8 +336,7 @@ static int child_init(int rank)
 		return -1;
 	}
 
-	if(fork_dummy_timer(PROC_TIMER, "CNXCC MB TIMER", 1,
-								check_calls_by_time, NULL, _data.check_period) < 0)
+	if(fork_dummy_timer(PROC_TIMER, "CNXCC MB TIMER", 1, check_calls_by_time, NULL, _data.check_period) < 0)
 	{
 		LM_ERR("failed to register MB TIMER routine as process\n");
 		return -1;
@@ -423,11 +422,11 @@ static void notify_call_termination(str *callid, str *from_tag, str *to_tag)
 int try_get_credit_data_entry(str *client_id, credit_data_t **credit_data)
 {
 	struct str_hash_entry *cd_entry	= NULL;
-	hash_tables_t *hts				= NULL;
-	*credit_data					= NULL;
+	hash_tables_t *hts		= NULL;
+	*credit_data			= NULL;
 
 	/* by money */
-	hts					= &_data.money;
+	hts				= &_data.money;
 	lock_get(&hts->lock);
 
 	cd_entry			= str_hash_get(hts->credit_data_by_client, client_id->s, client_id->len);
@@ -442,7 +441,7 @@ int try_get_credit_data_entry(str *client_id, credit_data_t **credit_data)
 	lock_release(&hts->lock);
 
 	/* by time */
-	hts					= &_data.time;
+	hts				= &_data.time;
 	lock_get(&hts->lock);
 
 	cd_entry			= str_hash_get(hts->credit_data_by_client, client_id->s, client_id->len);
@@ -457,7 +456,7 @@ int try_get_credit_data_entry(str *client_id, credit_data_t **credit_data)
 	lock_release(&hts->lock);
 
 	/* by channel */
-	hts					= &_data.channel;
+	hts				= &_data.channel;
 	lock_get(&hts->lock);
 
 	cd_entry			= str_hash_get(hts->credit_data_by_client, client_id->s, client_id->len);
@@ -477,11 +476,10 @@ int try_get_credit_data_entry(str *client_id, credit_data_t **credit_data)
 int try_get_call_entry(str *callid, call_t **call, hash_tables_t **hts)
 {
 	struct str_hash_entry *call_entry	= NULL;
-
 	*call					= NULL;
 
 	/* by money */
-	*hts					= &_data.money;
+	*hts				= &_data.money;
 	lock_get(&(*hts)->lock);
 
 	call_entry			= str_hash_get((*hts)->call_data_by_cid, callid->s, callid->len);
@@ -531,9 +529,9 @@ int try_get_call_entry(str *callid, call_t **call, hash_tables_t **hts)
 static void stop_billing(str *callid)
 {
 	struct str_hash_entry *cd_entry		= NULL;
-	call_t *call						= NULL;
-	hash_tables_t *hts					= NULL;
-	credit_data_t *credit_data			= NULL;
+	call_t *call				= NULL;
+	hash_tables_t *hts			= NULL;
+	credit_data_t *credit_data		= NULL;
 
 	/*
 	 * Search call data by call-id
@@ -557,11 +555,10 @@ static void stop_billing(str *callid)
 	}
 
 	lock_get(&hts->lock);
-
 	/*
 	 * Search credit_data by client_id
 	 */
-	cd_entry			= str_hash_get(hts->credit_data_by_client, call->client_id.s, call->client_id.len);
+	cd_entry	= str_hash_get(hts->credit_data_by_client, call->client_id.s, call->client_id.len);
 
 	if (cd_entry == NULL)
 	{
@@ -580,12 +577,12 @@ static void stop_billing(str *callid)
 	}
 
 	lock_release(&hts->lock);
-
 	/*
 	 * Update calls statistics
 	 */
 	lock_get(&_data.lock);
 
+;
 	_data.stats->active--;
 	_data.stats->total--;
 
@@ -831,7 +828,7 @@ exit:
 void terminate_all_calls(credit_data_t *credit_data)
 {
 	call_t 	*call 	= NULL,
-			*tmp 	= NULL;
+		*tmp 	= NULL;
 
 	clist_foreach_safe(credit_data->call_list, call, tmp, next)
 	{
@@ -855,15 +852,15 @@ static void free_call(call_t *call)
 
 	LM_DBG("Freeing call [%.*s]\n", call->sip_data.callid.len, call->sip_data.callid.s);
 
-	e			= str_hash_get(_data.money.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
+	e 	= str_hash_get(_data.money.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
 
 	if (e == NULL)
 	{
-		e			= str_hash_get(_data.time.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
+		e	= str_hash_get(_data.time.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
 
 		if (e == NULL)
 		{
-			e			= str_hash_get(_data.channel.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
+			e	= str_hash_get(_data.channel.call_data_by_cid, call->sip_data.callid.s, call->sip_data.callid.len);
 
 			if (e == NULL)
 			{
@@ -910,21 +907,21 @@ static int shm_str_hash_alloc(struct str_hash_table *ht, int size)
 static credit_data_t *get_or_create_credit_data_entry(str *client_id, credit_type_t type)
 {
 	struct str_hash_table *ht	= NULL;
-	gen_lock_t *lock			= NULL;
+	gen_lock_t *lock		= NULL;
 	struct str_hash_entry *e	= NULL;
 
 	switch(type)
 	{
 	case CREDIT_MONEY:
-		ht		= _data.money.credit_data_by_client;
+		ht	= _data.money.credit_data_by_client;
 		lock	=  &_data.money.lock;
 		break;
 	case CREDIT_TIME:
-		ht		= _data.time.credit_data_by_client;
+		ht	= _data.time.credit_data_by_client;
 		lock	=  &_data.time.lock;
 		break;
 	case CREDIT_CHANNEL:
-		ht		= _data.channel.credit_data_by_client;
+		ht	= _data.channel.credit_data_by_client;
 		lock	=  &_data.channel.lock;
 		break;
 	default:
@@ -934,7 +931,7 @@ static credit_data_t *get_or_create_credit_data_entry(str *client_id, credit_typ
 
 
 	lock_get(lock);
-	e							= str_hash_get(ht, client_id->s, client_id->len);
+	e		= str_hash_get(ht, client_id->s, client_id->len);
 	lock_release(lock);
 
 	/*
@@ -947,7 +944,7 @@ static credit_data_t *get_or_create_credit_data_entry(str *client_id, credit_typ
 	else
 	{
 		credit_data_t *credit_data	= NULL;
-		e							= shm_malloc(sizeof(struct str_hash_entry));
+		e				= shm_malloc(sizeof(struct str_hash_entry));
 
 		if (e == NULL)
 		{
@@ -961,9 +958,9 @@ static credit_data_t *get_or_create_credit_data_entry(str *client_id, credit_typ
 			return NULL;
 		}
 
-		e->flags					= 0;
-		e->u.p						= (void *) shm_malloc(sizeof(credit_data_t));
-		credit_data					= (credit_data_t *) e->u.p;
+		e->flags			= 0;
+		e->u.p				= (void *) shm_malloc(sizeof(credit_data_t));
+		credit_data			= (credit_data_t *) e->u.p;
 
 		lock_init(&credit_data->lock);
 
@@ -975,13 +972,13 @@ static credit_data_t *get_or_create_credit_data_entry(str *client_id, credit_typ
 			return NULL;
 		}
 
-		credit_data->max_amount					= 0;
+		credit_data->max_amount				= 0;
 		credit_data->concurrent_calls			= 0;
 		credit_data->consumed_amount			= 0;
-		credit_data->ended_calls_consumed_amount= 0;
+		credit_data->ended_calls_consumed_amount	= 0;
 		credit_data->number_of_calls			= 0;
 
-		credit_data->type						= type;
+		credit_data->type				= type;
 
 		/*
 		 * Copy the client_id value to the root of the calls list.
@@ -1018,7 +1015,7 @@ int terminate_call(call_t *call)
 
 	struct mi_root *root, *result	= NULL;
 	struct mi_node *node, *node1	= NULL;
-	struct mi_cmd *end_dlg_cmd		= NULL;
+	struct mi_cmd *end_dlg_cmd	= NULL;
 
 	root	= init_mi_tree(0, 0, 0);
 	if (root == NULL)
@@ -1062,7 +1059,7 @@ int terminate_call(call_t *call)
 		LM_DBG("dlg_end_dlg sent to call [%.*s]\n", call->sip_data.callid.len, call->sip_data.callid.s);
 		free_mi_tree(root);
 		free_mi_tree(result);
-
+		
 		notify_call_termination(&call->sip_data.callid, &call->sip_data.from_tag, &call->sip_data.to_tag);
 
 		return 0;
@@ -1076,8 +1073,7 @@ error:
 	return -1;
 }
 
-static call_t *alloc_new_call_by_money(credit_data_t *credit_data,
-										struct sip_msg *msg, double credit, double cost_per_second, int initial_pulse, int final_pulse)
+static call_t *alloc_new_call_by_money(credit_data_t *credit_data, struct sip_msg *msg, double credit, double cost_per_second, int initial_pulse, int final_pulse)
 {
 	call_t *call		= NULL;
 
@@ -1089,7 +1085,7 @@ static call_t *alloc_new_call_by_money(credit_data_t *credit_data,
 		goto error;
 	}
 
-	call 				= shm_malloc(sizeof(call_t));
+	call 			= shm_malloc(sizeof(call_t));
 	if (call == NULL)
 	{
 		LM_ERR("No shared memory left\n");
@@ -1106,11 +1102,11 @@ static call_t *alloc_new_call_by_money(credit_data_t *credit_data,
 	call->sip_data.to_tag.s		= NULL;
 	call->sip_data.to_tag.len 	= 0;
 	call->sip_data.from_tag.s	= NULL;
-	call->sip_data.from_tag.len = 0;
+	call->sip_data.from_tag.len 	= 0;
 
 	call->consumed_amount		= initial_pulse * cost_per_second;
-	call->confirmed				= FALSE;
-	call->max_amount			= credit;
+	call->confirmed			= FALSE;
+	call->max_amount		= credit;
 
 	call->money_based.cost_per_second	= cost_per_second;
 	call->money_based.initial_pulse		= initial_pulse;
@@ -1174,17 +1170,17 @@ static call_t *alloc_new_call_by_time(credit_data_t *credit_data, struct sip_msg
 	call->sip_data.to_tag.s		= NULL;
 	call->sip_data.to_tag.len 	= 0;
 	call->sip_data.from_tag.s	= NULL;
-	call->sip_data.from_tag.len = 0;
+	call->sip_data.from_tag.len 	= 0;
 
 	call->consumed_amount		= 0;
-	call->confirmed				= FALSE;
-	call->max_amount			= max_secs;
+	call->confirmed			= FALSE;
+	call->max_amount		= max_secs;
 
 	/*
 	 * Reference the client_id from the root of the list
 	 */
-	call->client_id.s			= credit_data->call_list->client_id.s;
-	call->client_id.len			= credit_data->call_list->client_id.len;
+	call->client_id.s		= credit_data->call_list->client_id.s;
+	call->client_id.len		= credit_data->call_list->client_id.len;
 
 	/*
 	 * Insert the newly created call to the list of calls
@@ -1211,7 +1207,7 @@ error:
 
 static call_t *alloc_new_call_by_channel(credit_data_t *credit_data, struct sip_msg *msg, int max_chan)
 {
-	call_t *call		= NULL;
+	call_t *call	= NULL;
 
 	lock_get(&credit_data->lock);
 
@@ -1221,7 +1217,7 @@ static call_t *alloc_new_call_by_channel(credit_data_t *credit_data, struct sip_
 		goto error;
 	}
 
-	call 				= shm_malloc(sizeof(call_t));
+	call 		= shm_malloc(sizeof(call_t));
 	if (call == NULL)
 	{
 		LM_ERR("No shared memory left\n");
@@ -1238,17 +1234,17 @@ static call_t *alloc_new_call_by_channel(credit_data_t *credit_data, struct sip_
 	call->sip_data.to_tag.s		= NULL;
 	call->sip_data.to_tag.len 	= 0;
 	call->sip_data.from_tag.s	= NULL;
-	call->sip_data.from_tag.len = 0;
+	call->sip_data.from_tag.len 	= 0;
 
 	call->consumed_amount		= 0;
-	call->confirmed				= FALSE;
-	call->max_amount			= max_chan;
+	call->confirmed			= FALSE;
+	call->max_amount		= max_chan;
 
 	/*
 	 * Reference the client_id from the root of the list
 	 */
-	call->client_id.s			= credit_data->call_list->client_id.s;
-	call->client_id.len			= credit_data->call_list->client_id.len;
+	call->client_id.s		= credit_data->call_list->client_id.s;
+	call->client_id.len		= credit_data->call_list->client_id.len;
 
 	/*
 	 * Insert the newly created call to the list of calls
@@ -1277,21 +1273,21 @@ error:
 static int add_call_by_cid(str *cid, call_t *call, credit_type_t type)
 {
 	struct str_hash_table *ht	= NULL;
-	gen_lock_t *lock			= NULL;
+	gen_lock_t *lock		= NULL;
 	struct str_hash_entry *e	= NULL;
 
 	switch(type)
 	{
 	case CREDIT_MONEY:
-		ht		= _data.money.call_data_by_cid;
+		ht	= _data.money.call_data_by_cid;
 		lock	=  &_data.money.lock;
 		break;
 	case CREDIT_TIME:
-		ht		= _data.time.call_data_by_cid;
+		ht	= _data.time.call_data_by_cid;
 		lock	=  &_data.time.lock;
 		break;
 	case CREDIT_CHANNEL:
-		ht		= _data.channel.call_data_by_cid;
+		ht	= _data.channel.call_data_by_cid;
 		lock	=  &_data.channel.lock;
 		break;
 	default:
@@ -1343,7 +1339,7 @@ static int add_call_by_cid(str *cid, call_t *call, credit_type_t type)
 		return -1;
 	}
 
-	e->u.p		= call;
+	e->u.p	= call;
 
 	lock_get(lock);
 	str_hash_add(ht, e);
@@ -1373,30 +1369,30 @@ static inline int get_pv_value(struct sip_msg* msg, pv_spec_t* spec, pv_value_t*
 }
 
 static int set_max_credit(struct sip_msg* msg,
-							char *str_pv_client,
-							char *str_pv_credit, char *str_pv_cps,
-							char *str_pv_inip, char *str_pv_finp)
+				char *str_pv_client,
+				char *str_pv_credit, char *str_pv_cps,
+				char *str_pv_inip, char *str_pv_finp)
 {
 	credit_data_t *credit_data 	= NULL;
-	call_t *call				= NULL;
+	call_t *call			= NULL;
 
-	pv_spec_t *client_id_spec		= (pv_spec_t *) str_pv_client,
-			  *credit_spec			= (pv_spec_t *) str_pv_credit,
-			  *cps_spec				= (pv_spec_t *) str_pv_cps,
+	pv_spec_t *client_id_spec	= (pv_spec_t *) str_pv_client,
+			  *credit_spec	= (pv_spec_t *) str_pv_credit,
+			  *cps_spec	= (pv_spec_t *) str_pv_cps,
 			  *initial_pulse_spec	= (pv_spec_t *) str_pv_inip,
-			  *final_pulse_spec		= (pv_spec_t *) str_pv_finp;
+			  *final_pulse_spec	= (pv_spec_t *) str_pv_finp;
 
 	pv_value_t client_id_val,
-				credit_val,
-				cps_val,
-				initial_pulse_val,
-				final_pulse_val;
+			credit_val,
+			cps_val,
+			initial_pulse_val,
+			final_pulse_val;
 
-	double credit					= 0,
-		   cost_per_second			= 0;
+	double credit		= 0,
+		cost_per_second	= 0;
 
-	unsigned int initial_pulse		= 0,
-			final_pulse				= 0;
+	unsigned int initial_pulse	= 0,
+			final_pulse	= 0;
 
 	if (msg->first_line.type == SIP_REQUEST && msg->first_line.u.request.method_value == METHOD_INVITE)
 	{
@@ -1539,10 +1535,10 @@ static int get_channel_count(struct sip_msg* msg, char* str_pv_client, char* str
 {
 	credit_data_t *credit_data 	= NULL;
 	pv_spec_t *chan_count_spec	= (pv_spec_t *) str_pv_chan_count,
-			  *client_id_spec	= (pv_spec_t *) str_pv_client;
+		  *client_id_spec	= (pv_spec_t *) str_pv_client;
 
 	pv_value_t chan_count_val, client_id_val;
-	int value					= -1;
+	int value			= -1;
 
 	if (pv_get_spec_value(msg, client_id_spec, &client_id_val) != 0)
 	{
@@ -1556,14 +1552,14 @@ static int get_channel_count(struct sip_msg* msg, char* str_pv_client, char* str
 		return -1;
 	}
 
-	if (try_get_credit_data_entry(&client_id_val.rs, &credit_data) == 0)
+	if (try_get_credit_data_entry(&client_id_val.rs, &credit_data) == 0) 
 		value	= credit_data->number_of_calls;
 	else
 		LM_ALERT("[%.*s] not found\n", msg->callid->body.len, msg->callid->body.s);
 
 	if (!pv_is_w(chan_count_spec))
 	{
-		LM_ERR("pvar is not writable");
+		LM_ERR("pvar is not writable\n");
 		return -1;
 	}
 
@@ -1575,7 +1571,7 @@ static int get_channel_count(struct sip_msg* msg, char* str_pv_client, char* str
 		chan_count_val.rs.s 	= int2str(value, &chan_count_val.rs.len);
 	else
 	{
-		char buff[2]			= { '-', '1' };
+		char buff[2]		= { '-', '1' };
 		chan_count_val.rs.s 	= buff;
 		chan_count_val.rs.len	= 2;
 	}
@@ -1592,11 +1588,11 @@ static int get_channel_count(struct sip_msg* msg, char* str_pv_client, char* str
 static int set_max_channels(struct sip_msg* msg, char* str_pv_client, char* str_pv_max_chan)
 {
 	credit_data_t *credit_data 	= NULL;
-	call_t *call				= NULL;
+	call_t *call			= NULL;
 	pv_spec_t *max_chan_spec	= (pv_spec_t *) str_pv_max_chan,
-			  *client_id_spec	= (pv_spec_t *) str_pv_client;
+		  *client_id_spec	= (pv_spec_t *) str_pv_client;
 	pv_value_t max_chan_val, client_id_val;
-	int max_chan				= 0;
+	int max_chan			= 0;
 
 	set_ctrl_flag(msg);
 
@@ -1640,8 +1636,8 @@ static int set_max_channels(struct sip_msg* msg, char* str_pv_client, char* str_
 		}
 
 		LM_DBG("Setting up new call for client [%.*s], max-chan[%d], call-id[%.*s]\n", client_id_val.rs.len, client_id_val.rs.s,
-																		max_chan,
-																		msg->callid->body.len, msg->callid->body.s);
+												max_chan,
+												msg->callid->body.len, msg->callid->body.s);
 
 		if ((credit_data = get_or_create_credit_data_entry(&client_id_val.rs, CREDIT_CHANNEL)) == NULL)
 		{
@@ -1650,7 +1646,7 @@ static int set_max_channels(struct sip_msg* msg, char* str_pv_client, char* str_
 		}
 
 		if (credit_data->number_of_calls + 1 > max_chan)
-			return -2; // you have, between calls being setup plus those established, more than you maximum quota
+			return -2; // you have, among calls being setup plus those established, more than you maximum quota
 
 		if (credit_data->concurrent_calls + 1 > max_chan)
 			return -3; // you have the max amount of established calls already
@@ -1679,11 +1675,11 @@ static int set_max_channels(struct sip_msg* msg, char* str_pv_client, char* str_
 static int set_max_time(struct sip_msg* msg, char* str_pv_client, char* str_pv_maxsecs)
 {
 	credit_data_t *credit_data 	= NULL;
-	call_t *call				= NULL;
+	call_t *call			= NULL;
 	pv_spec_t *max_secs_spec	= (pv_spec_t *) str_pv_maxsecs,
-			  *client_id_spec	= (pv_spec_t *) str_pv_client;
+		  *client_id_spec	= (pv_spec_t *) str_pv_client;
 	pv_value_t max_secs_val, client_id_val;
-	int max_secs				= 0;
+	int max_secs			= 0;
 
 	set_ctrl_flag(msg);
 
@@ -1812,7 +1808,7 @@ static int update_max_time(struct sip_msg* msg, char* str_pv_client, char* str_p
 	       *tmp_call		= NULL;
 
 	lock_get(&_data.time.lock);
-	e							= str_hash_get(ht, client_id_val.rs.s, client_id_val.rs.len);
+	e				= str_hash_get(ht, client_id_val.rs.s, client_id_val.rs.len);
 	lock_release(&_data.time.lock);
 
 	if (e == NULL)
@@ -1821,13 +1817,13 @@ static int update_max_time(struct sip_msg* msg, char* str_pv_client, char* str_p
 		return -1;
 	}
 		
-	credit_data					= (credit_data_t *) e->u.p;
+	credit_data			= (credit_data_t *) e->u.p;
 
 	lock_get(&credit_data->lock);
 
 	LM_DBG("Updating max-secs for [%.*s] from [%f] to [%f]\n", e->key.len, e->key.s, credit_data->max_amount, credit_data->max_amount + secs);
 	
-	credit_data->max_amount				+= secs;
+	credit_data->max_amount		+= secs;
 
 	if (credit_data->number_of_calls > 0)
 		update_fraction	= secs / credit_data->number_of_calls;
@@ -1840,7 +1836,7 @@ static int update_max_time(struct sip_msg* msg, char* str_pv_client, char* str_p
 		call->max_amount	+= update_fraction;
 	}
 
-//redit_data->consumed_amount			= 0;
+//redit_data->consumed_amount		= 0;
 
 
 	lock_release(&credit_data->lock);
diff --git a/modules/cnxcc/cnxcc_select.c b/modules/cnxcc/cnxcc_select.c
index 99b6d1f..46eb568 100644
--- a/modules/cnxcc/cnxcc_select.c
+++ b/modules/cnxcc/cnxcc_select.c
@@ -46,7 +46,7 @@ int sel_channels_count(str* res, select_t* s, struct sip_msg* msg)
 	LM_DBG("sel_channels_count for [%.*s]",  s->params[2].v.s.len, s->params[2].v.s.s);
 
 	credit_data_t *credit_data	= NULL;
-	int value					= 0;
+	int value			= 0;
 
 	if (s->params[2].v.s.len <= 0)
 	{
@@ -54,7 +54,7 @@ int sel_channels_count(str* res, select_t* s, struct sip_msg* msg)
 		return -1;
 	}
 
-	if (try_get_credit_data_entry(&s->params[2].v.s, &credit_data) >= 0)
+	if (try_get_credit_data_entry(&s->params[2].v.s, &credit_data) == 0)
 		value = credit_data->number_of_calls;
 	else
 		LM_DBG("Client [%.*s] not found", s->params[2].v.s.len, s->params[2].v.s.s);
diff --git a/modules/db_flatstore/km_flat_con.c b/modules/db_flatstore/km_flat_con.c
index c4f38bb..5a6ae40 100644
--- a/modules/db_flatstore/km_flat_con.c
+++ b/modules/db_flatstore/km_flat_con.c
@@ -115,6 +115,7 @@ struct flat_con* flat_new_connection(struct flat_id* id)
 	fn = get_name(id);
 	if (fn==0){
 		LM_ERR("get_name() failed\n");
+		pkg_free(res);
 		return 0;
 	}
 
diff --git a/modules/db_mysql/km_dbase.c b/modules/db_mysql/km_dbase.c
index f644dea..688d433 100644
--- a/modules/db_mysql/km_dbase.c
+++ b/modules/db_mysql/km_dbase.c
@@ -190,14 +190,14 @@ static int db_mysql_store_result(const db1_con_t* _h, db1_res_t** _r)
 	if (db_mysql_convert_result(_h, *_r) < 0) {
 		LM_ERR("error while converting result\n");
 		LM_DBG("freeing result set at %p\n", _r);
-		pkg_free(*_r);
-		*_r = 0;
 		/* all mem on Kamailio API side is already freed by
 		 * db_mysql_convert_result in case of error, but we also need
-		 * to free the mem from the mysql lib side */
-		mysql_free_result(RES_RESULT(*_r));
+		 * to free the mem from the mysql lib side, internal pkg for it
+		 * and *_r */
+		db_mysql_free_result(_h, *_r);
+		*_r = 0;
 #if (MYSQL_VERSION_ID >= 40100)
-		while( mysql_more_results(CON_CONNECTION(_h)) && mysql_next_result(CON_CONNECTION(_h)) > 0 ) {
+		while( mysql_more_results(CON_CONNECTION(_h)) && mysql_next_result(CON_CONNECTION(_h)) == 0 ) {
 			MYSQL_RES *res = mysql_store_result( CON_CONNECTION(_h) );
 			mysql_free_result(res);
 		}
@@ -207,7 +207,7 @@ static int db_mysql_store_result(const db1_con_t* _h, db1_res_t** _r)
 
 done:
 #if (MYSQL_VERSION_ID >= 40100)
-	while( mysql_more_results(CON_CONNECTION(_h)) && mysql_next_result(CON_CONNECTION(_h)) > 0 ) {
+	while( mysql_more_results(CON_CONNECTION(_h)) && mysql_next_result(CON_CONNECTION(_h)) == 0 ) {
 		MYSQL_RES *res = mysql_store_result( CON_CONNECTION(_h) );
 		mysql_free_result(res);
 	}
diff --git a/modules/db_mysql/km_res.c b/modules/db_mysql/km_res.c
index 965e6dc..3f1ca26 100644
--- a/modules/db_mysql/km_res.c
+++ b/modules/db_mysql/km_res.c
@@ -69,6 +69,7 @@ int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r)
 	}
 	
 	if (db_allocate_columns(_r, RES_COL_N(_r)) != 0) {
+		RES_COL_N(_r) = 0;
 		LM_ERR("could not allocate columns\n");
 		return -3;
 	}
@@ -173,6 +174,7 @@ static inline int db_mysql_convert_rows(const db1_con_t* _h, db1_res_t* _r)
 
 	if (db_allocate_rows(_r) < 0) {
 		LM_ERR("could not allocate rows");
+		RES_ROW_N(_r) = 0;
 		return -2;
 	}
 
diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c
index 9393d7f..21c4391 100644
--- a/modules/dialog/dlg_handlers.c
+++ b/modules/dialog/dlg_handlers.c
@@ -543,6 +543,8 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param)
 		LM_DBG("dialog %p failed (negative reply)\n", dlg);
 		/* dialog setup not completed (3456XX) */
 		run_dlg_callbacks( DLGCB_FAILED, dlg, req, rpl, DLG_DIR_UPSTREAM, 0);
+		if(dlg_wait_ack==1)
+			dlg_set_tm_waitack(t, dlg);
 		/* do unref */
 		if (unref)
 			dlg_unref(dlg, unref);
@@ -551,8 +553,6 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param)
 
 		if_update_stat(dlg_enable_stats, failed_dlgs, 1);
 
-		if(dlg_wait_ack==1)
-			dlg_set_tm_waitack(t, dlg);
 		goto done;
 	}
 
@@ -1353,7 +1353,8 @@ void dlg_ontimeout(struct dlg_tl *tl)
 
 		if(dlg->iflags&DLG_IFLAG_TIMEOUTBYE)
 		{
-			dlg_bye_all(dlg, NULL);
+			if(dlg_bye_all(dlg, NULL)<0)
+				dlg_unref(dlg, 1);
 			/* run event route for end of dlg */
 			dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED);
 			dlg_unref(dlg, 1);
@@ -1477,15 +1478,15 @@ void dlg_run_event_route(dlg_cell_t *dlg, sip_msg_t *msg, int ostate, int nstate
 	else
 		fmsg = msg;
 
-	if (exec_pre_script_cb(fmsg, REQUEST_CB_TYPE)>0)
+	if (exec_pre_script_cb(fmsg, LOCAL_CB_TYPE)>0)
 	{
 		dlg_ref(dlg, 1);
 		dlg_set_ctx_iuid(dlg);
 		LM_DBG("executing event_route %d on state %d\n", rt, nstate);
-		set_route_type(REQUEST_ROUTE);
+		set_route_type(LOCAL_ROUTE);
 		run_top_route(event_rt.rlist[rt], fmsg, 0);
 		dlg_reset_ctx_iuid();
-		exec_post_script_cb(fmsg, REQUEST_CB_TYPE);
+		exec_post_script_cb(fmsg, LOCAL_CB_TYPE);
 		dlg_unref(dlg, 1);
 	}
 }
diff --git a/modules/dialog/dlg_var.c b/modules/dialog/dlg_var.c
index 111dcd8..4b2ca89 100644
--- a/modules/dialog/dlg_var.c
+++ b/modules/dialog/dlg_var.c
@@ -284,6 +284,7 @@ int pv_get_dlg_variable(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
 {
 	dlg_cell_t *dlg;
 	str * value;
+	str spv;
 
 	if (param==NULL || param->pvn.type!=PV_NAME_INTSTR
 			|| param->pvn.u.isname.type!=AVP_NAME_STR
@@ -306,6 +307,19 @@ int pv_get_dlg_variable(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
 	/* dcm: todo - the value should be cloned for safe usage */
 	value = get_dlg_variable_unsafe(dlg, &param->pvn.u.isname.name.s);
 
+	spv.s = NULL;
+	if(value) {
+		spv.len = pv_get_buffer_size();
+		if(spv.len<value->len+1) {
+			LM_ERR("pv buffer too small (%d) - needed %d\n", spv.len, value->len);
+		} else {
+			spv.s = pv_get_buffer();
+			strncpy(spv.s, value->s, value->len);
+			spv.len = value->len;
+			spv.s[spv.len] = '\0';
+		}
+	}
+
 	print_lists(dlg);
 
 	/* unlock dialog */
@@ -314,8 +328,8 @@ int pv_get_dlg_variable(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
 		dlg_release(dlg);
 	}
 
-	if (value)
-		return pv_get_strval(msg, param, res, value);
+	if (spv.s)
+		return pv_get_strval(msg, param, res, &spv);
 
 
 	return pv_get_null(msg, param, res);
diff --git a/modules/drouting/drouting.c b/modules/drouting/drouting.c
index 60006b1..4322a7e 100644
--- a/modules/drouting/drouting.c
+++ b/modules/drouting/drouting.c
@@ -754,7 +754,7 @@ again:
 		}
 	}
 
-	if (rt_info->route_idx>0 && rt_info->route_idx<RT_NO) {
+	if (rt_info->route_idx>0 && main_rt.rlist[rt_info->route_idx]!=NULL) {
 		ret = run_top_route(main_rt.rlist[rt_info->route_idx], msg, 0);
 		if (ret<1) {
 			/* drop the action */
diff --git a/modules/ipops/ipops_pv.c b/modules/ipops/ipops_pv.c
index 08be1fe..fcf0620 100644
--- a/modules/ipops/ipops_pv.c
+++ b/modules/ipops/ipops_pv.c
@@ -261,6 +261,7 @@ int pv_parse_dns_name(pv_spec_t *sp, str *in)
 
 error:
 	LM_ERR("error at PV dns name: %.*s\n", in->len, in->s);
+	if(dpv) pkg_free(dpv);
 	return -1;
 }
 
diff --git a/modules/mtree/mtree_mod.c b/modules/mtree/mtree_mod.c
index 4e32dfa..96e6479 100644
--- a/modules/mtree/mtree_mod.c
+++ b/modules/mtree/mtree_mod.c
@@ -550,8 +550,7 @@ static int mt_load_db(m_tree_t *pt)
 		} else {
 			if(RES_ROW_N(db_res)==0)
 			{
-				mt_dbf.free_result(db_con, db_res);
-				return 0;
+				goto dbreloaded;
 			}
 		}
 	} else {
@@ -561,8 +560,7 @@ static int mt_load_db(m_tree_t *pt)
 		{
 			if(ret==0)
 			{
-				mt_dbf.free_result(db_con, db_res);
-				return 0;
+				goto dbreloaded;
 			} else {
 				goto error;
 			}
@@ -617,6 +615,8 @@ static int mt_load_db(m_tree_t *pt)
 			break;
 		}
 	}  while(RES_ROW_N(db_res)>0);
+
+dbreloaded:
 	mt_dbf.free_result(db_con, db_res);
 
 
diff --git a/modules/pipelimit/pipelimit.c b/modules/pipelimit/pipelimit.c
index 77d2796..5aeb071 100644
--- a/modules/pipelimit/pipelimit.c
+++ b/modules/pipelimit/pipelimit.c
@@ -308,7 +308,7 @@ static int mod_init(void)
 		return -1;
 	}
 	timer_init(pl_timer, pl_timer_handle, 0, F_TIMER_FAST);
-	timer_add(pl_timer, MS_TO_TICKS(1500)); /* Start it after 1500ms */
+	timer_add(pl_timer, MS_TO_TICKS(1000)); /* Start it after 1000ms */
 
 	/* bind the SL API */
 	if (sl_load_api(&slb)!=0) {
diff --git a/modules/presence_dialoginfo/notify_body.c b/modules/presence_dialoginfo/notify_body.c
index 7f74b1f..92ece0a 100644
--- a/modules/presence_dialoginfo/notify_body.c
+++ b/modules/presence_dialoginfo/notify_body.c
@@ -101,7 +101,7 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n)
 	xmlDocPtr  doc = NULL;
 	xmlNodePtr root_node = NULL;
 	xmlNsPtr   namespace = NULL;
-	int winner_priority = -1, priority;
+	/*int winner_priority = -1, priority;*/
 
 	xmlNodePtr p_root= NULL;
 	xmlDocPtr* xml_array ;
@@ -111,6 +111,7 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n)
 	xmlNodePtr confirmed_node = NULL;
 	xmlNodePtr proceed_node = NULL;
 	xmlNodePtr trying_node = NULL;
+	xmlNodePtr next_node = NULL;
 
 
 	char *state = NULL;
@@ -214,7 +215,8 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n)
 			goto error;
 		}
 		if (p_root->children) {
-			for (node = p_root->children; node; node = node->next) {
+			for (node = p_root->children; node; node = next_node) {
+				next_node = node->next;
 				if (node->type == XML_ELEMENT_NODE) {
 					LM_DBG("node type: Element, name: %s\n", node->name);
 					/* we do not copy the node, but unlink it and then add it ot the new node
diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c
index 3f48830..59a3539 100644
--- a/modules/pv/pv_core.c
+++ b/modules/pv/pv_core.c
@@ -991,6 +991,11 @@ int pv_get_pai(struct sip_msg *msg, pv_param_t *param,
 	}
 
 	pai_body = get_pai(msg);
+	if(pai_body==NULL || pai_body->id==NULL)
+	{
+		LM_DBG("no P-Asserted-Identity header or empty body\n");
+		return pv_get_null(msg, param, res);
+	}
 	pai_uri = &pai_body->id[0];
 	cur_id = 0;
 	i = 0;
diff --git a/modules/pv/pv_trans.c b/modules/pv/pv_trans.c
index 7c75deb..b2561e2 100644
--- a/modules/pv/pv_trans.c
+++ b/modules/pv/pv_trans.c
@@ -126,13 +126,13 @@ static int urlencode_param(str *sin, str *sout)
 {
 	char *at, *p;
 
-	at = sout->s;
-	p  = sin->s;
-
 	if (sin==NULL || sout==NULL || sin->s==NULL || sout->s==NULL ||
 			sin->len<0 || sout->len < 3*sin->len+1)
 		return -1;
 
+	at = sout->s;
+	p  = sin->s;
+
 	while (p < sin->s+sin->len) {
 		if (isalnum(*p) || *p == '-' || *p == '_' || *p == '.' || *p == '~')
 			*at++ = *p;
@@ -1625,7 +1625,7 @@ int tr_eval_line(struct sip_msg *msg, tr_param_t *tp, int subtype,
 					if(p==NULL)
 					{
 						/* last line */
-						mv.len = (val->rs.s + val->rs.len) - p;
+						mv.len = (val->rs.s + val->rs.len) - mv.s;
 					} else {
 						mv.len = p - mv.s;
 					}
@@ -1707,7 +1707,7 @@ int tr_eval_line(struct sip_msg *msg, tr_param_t *tp, int subtype,
 					if(p==NULL)
 					{
 						/* last line */
-						mv.len = (val->rs.s + val->rs.len) - p;
+						mv.len = (val->rs.s + val->rs.len) - mv.s;
 					} else {
 						mv.len = p - mv.s;
 					}
diff --git a/modules/rls/list.h b/modules/rls/list.h
index c9904aa..8c13b4d 100644
--- a/modules/rls/list.h
+++ b/modules/rls/list.h
@@ -41,8 +41,11 @@ static inline list_entry_t *list_insert(str *strng, list_entry_t *list, int *dup
 	if (cmp == 0)
 	{
 		if (duplicate != NULL)
+		{
 			*duplicate = 1;
-		return list;
+			pkg_free(p);
+			return list;
+		}
 	}
 	if (cmp > 0)
 	{
@@ -58,8 +61,11 @@ static inline list_entry_t *list_insert(str *strng, list_entry_t *list, int *dup
 		if (cmp == 0)
 		{
 			if (duplicate != NULL)
+			{
 				*duplicate = 1;
-			return list;
+				pkg_free(p);
+				return list;
+			}
 		}
 
 		p->next = q->next;
diff --git a/modules/rls/notify.c b/modules/rls/notify.c
index eb6a0e1..a8f3dd5 100644
--- a/modules/rls/notify.c
+++ b/modules/rls/notify.c
@@ -1366,7 +1366,7 @@ int rls_get_resource_list(str *rl_uri, str *username, str *domain,
 	{
 		/* No path specified - use all resource-lists. */
 		*rl_node = XMLDocGetNodeByName(*xmldoc,"resource-lists", NULL);
-		if(rl_node==NULL)
+		if(*rl_node==NULL)
 		{
 			LM_ERR("no resource-lists node in XML document\n");
 			goto error;
diff --git a/modules/rls/subscribe.c b/modules/rls/subscribe.c
index d15a601..7c45908 100644
--- a/modules/rls/subscribe.c
+++ b/modules/rls/subscribe.c
@@ -1037,6 +1037,8 @@ int send_resource_subs(char* uri, void* param)
 		LM_WARN("%.*s has %.*s multiple times in the same resource list\n",
 			s->watcher_uri->len, s->watcher_uri->s,
 			s->pres_uri->len, s->pres_uri->s);
+		pkg_free(tmp_str->s);
+		pkg_free(tmp_str);
 		return 1;
 	}
 
diff --git a/modules/rls/utils.h b/modules/rls/utils.h
index 4b245e7..7918a9d 100644
--- a/modules/rls/utils.h
+++ b/modules/rls/utils.h
@@ -21,7 +21,7 @@
  *
  */
 
-#ifndef RLS_URILS_H
+#ifndef RLS_UTILS_H
 #define RLS_UTILS_H
 
 #include "../../ut.h"
diff --git a/modules/rtimer/rtimer_mod.c b/modules/rtimer/rtimer_mod.c
index 03a002d..271b888 100644
--- a/modules/rtimer/rtimer_mod.c
+++ b/modules/rtimer/rtimer_mod.c
@@ -37,6 +37,8 @@
 #include "../../socket_info.h"
 #include "../../dset.h"
 #include "../../pt.h"
+#include "../../usr_avp.h"
+#include "../../xavp.h"
 #include "../../timer_proc.h"
 #include "../../script_cb.h"
 #include "../../parser/parse_param.h"
@@ -190,6 +192,10 @@ void stm_timer_exec(unsigned int ticks, void *param)
 		set_route_type(REQUEST_ROUTE);
 		run_top_route(main_rt.rlist[rt->route], fmsg, 0);
 		exec_post_script_cb(fmsg, REQUEST_CB_TYPE);
+		reset_avps();
+#ifdef WITH_XAVP
+		xavp_reset_list();
+#endif
 	}
 }
 
diff --git a/modules/siputils/checks.c b/modules/siputils/checks.c
index a1a9344..7f50cfc 100644
--- a/modules/siputils/checks.c
+++ b/modules/siputils/checks.c
@@ -354,7 +354,7 @@ int tel2sip(struct sip_msg* _msg, char* _uri, char* _hostpart, char* _res)
     if (strncasecmp(uri.s, "tel:", 4) != 0) return 1;
     
     /* reserve memory for clean tel uri */
-    tel_uri.s = pkg_malloc(uri.len);
+    tel_uri.s = pkg_malloc(uri.len+1);
     if (tel_uri.s == 0) {
 	LM_ERR("no more pkg memory\n");
 	return -1;
diff --git a/modules/siputils/sipops.c b/modules/siputils/sipops.c
index 357d92c..5394458 100644
--- a/modules/siputils/sipops.c
+++ b/modules/siputils/sipops.c
@@ -92,7 +92,7 @@ int w_cmp_aor(struct sip_msg *msg, char *uri1, char *uri2)
 
 int w_is_gruu(sip_msg_t *msg, char *uri1, char *p2)
 {
-	str s1;
+        str s1, *s2;
 	sip_uri_t turi;
 	sip_uri_t *puri;
 
@@ -103,12 +103,17 @@ int w_is_gruu(sip_msg_t *msg, char *uri1, char *p2)
 			LM_ERR("cannot get first parameter\n");
 			return -8;
 		}
-		if(parse_uri(s1.s, s1.len, &turi)!=0)
-			return -1;
+		if(parse_uri(s1.s, s1.len, &turi)!=0) {
+		    LM_ERR("parsing of uri '%.*s' failed\n", s1.len, s1.s);
+		    return -1;
+		}
 		puri = &turi;
 	} else {
-		if(parse_sip_msg_uri(msg)<0)
-			return -1;
+  	        if(parse_sip_msg_uri(msg)<0) {
+		    s2 = GET_RURI(msg);
+  		    LM_ERR("parsing of uri '%.*s' failed\n", s2->len, s2->s);
+		    return -1;
+		}
 		puri = &msg->parsed_uri;
 	}
 	if(puri->gr.s!=NULL)
diff --git a/modules/topoh/th_msg.c b/modules/topoh/th_msg.c
index 4d25750..d572f00 100644
--- a/modules/topoh/th_msg.c
+++ b/modules/topoh/th_msg.c
@@ -136,7 +136,7 @@ int th_get_uri_type(str *uri, int *mode, str *value)
 			return -1;
 		return 2; /* decode */
 	} else {
-		if(check_self(&puri.host, (puri.port_no)?puri.port_no:SIP_PORT, 0)==1)
+		if(check_self(&puri.host, (puri.port_no)?puri.port_no:0, 0)==1)
 		{
 			/* myself -- matched on all protos */
 			ret = th_get_param_value(&puri.params, &r2, value);
diff --git a/modules/websocket/ws_conn.c b/modules/websocket/ws_conn.c
index 9f2b672..62a1b61 100644
--- a/modules/websocket/ws_conn.c
+++ b/modules/websocket/ws_conn.c
@@ -47,6 +47,9 @@ gen_lock_t *wsconn_lock = NULL;
 #define WSCONN_LOCK	lock_get(wsconn_lock)
 #define WSCONN_UNLOCK	lock_release(wsconn_lock)
 
+#define wsconn_ref(c)   atomic_inc(&((c)->refcnt))
+#define wsconn_unref(c) atomic_dec_and_test(&((c)->refcnt))
+
 gen_lock_t *wsstat_lock = NULL;
 
 ws_connection_used_list_t *wsconn_used_list = NULL;
@@ -197,6 +200,8 @@ int wsconn_add(struct receive_info rcv, unsigned int sub_protocol)
 	int id_hash = tcp_id_hash(id);
 	ws_connection_t *wsc;
 
+	LM_DBG("wsconn_add id [%d]\n", id);
+
 	/* Allocate and fill in new WebSocket connection */
 	wsc = shm_malloc(sizeof(ws_connection_t));
 	if (wsc == NULL)
@@ -210,6 +215,10 @@ int wsconn_add(struct receive_info rcv, unsigned int sub_protocol)
 	wsc->state = WS_S_OPEN;
 	wsc->rcv = rcv;
 	wsc->sub_protocol = sub_protocol;
+	wsc->run_event = 0;
+	atomic_set(&wsc->refcnt, 0);
+
+	LM_DBG("wsconn_add new wsc => [%p], ref => [%d]\n", wsc, atomic_get(&wsc->refcnt));
 
 	WSCONN_LOCK;
 	/* Add to WebSocket connection table */
@@ -225,8 +234,12 @@ int wsconn_add(struct receive_info rcv, unsigned int sub_protocol)
 		wsconn_used_list->tail->used_next = wsc;
 		wsconn_used_list->tail = wsc;
 	}
+	wsconn_ref(wsc);
+
 	WSCONN_UNLOCK;
 
+	LM_DBG("wsconn_add added to conn_table wsc => [%p], ref => [%d]\n", wsc, atomic_get(&wsc->refcnt));
+
 	/* Update connection statistics */
 	lock_get(wsstat_lock);
 
@@ -290,32 +303,29 @@ static void wsconn_run_route(ws_connection_t *wsc)
 	set_route_type(backup_rt);
 }
 
-int wsconn_rm(ws_connection_t *wsc, ws_conn_eventroute_t run_event_route)
+static void wsconn_dtor(ws_connection_t *wsc)
 {
 	if (!wsc)
-	{
-		LM_ERR("wsconn_rm: null pointer\n");
-		return -1;
-	}
+		return;
 
-	if (run_event_route == WSCONN_EVENTROUTE_YES)
+	LM_DBG("wsconn_dtor for [%p] refcnt [%d]\n", wsc, atomic_get(&wsc->refcnt));
+
+	if (wsc->run_event)
 		wsconn_run_route(wsc);
 
-	WSCONN_LOCK;
-	/* Remove from the WebSocket used list */
-	if (wsconn_used_list->head == wsc)
-		wsconn_used_list->head = wsc->used_next;
-	if (wsconn_used_list->tail == wsc)
-		wsconn_used_list->tail = wsc->used_prev;
-	if (wsc->used_prev)
-		wsc->used_prev->used_next = wsc->used_next;
-	if (wsc->used_next)
-		wsc->used_next->used_prev = wsc->used_prev;
+	shm_free(wsc);
 
-	_wsconn_rm(wsc);
-	WSCONN_UNLOCK;
+	LM_DBG("wsconn_dtor for [%p] destroyed\n", wsc);
+}
 
-	return 0;
+int wsconn_rm(ws_connection_t *wsc, ws_conn_eventroute_t run_event_route)
+{
+	LM_DBG("wsconn_rm for [%p] refcnt [%d]\n", wsc, atomic_get(&wsc->refcnt));
+
+	if (run_event_route == WSCONN_EVENTROUTE_YES)
+		wsc->run_event = 1;
+
+	return wsconn_put(wsc);
 }
 
 int wsconn_update(ws_connection_t *wsc)
@@ -366,17 +376,70 @@ void wsconn_close_now(ws_connection_t *wsc)
 	con->timeout = get_ticks_raw();
 }
 
+/* must be called with unlocked WSCONN_LOCK */
+int wsconn_put(ws_connection_t *wsc)
+{
+	int destroy = 0;
+
+	LM_DBG("wsconn_put start for [%p] refcnt [%d]\n", wsc, atomic_get(&wsc->refcnt));
+
+	if (!wsc)
+		return -1;
+
+	WSCONN_LOCK;
+	/* refcnt == 0*/
+	if (wsconn_unref(wsc))
+	{
+		/* Remove from the WebSocket used list */
+		if (wsconn_used_list->head == wsc)
+			wsconn_used_list->head = wsc->used_next;
+		if (wsconn_used_list->tail == wsc)
+			wsconn_used_list->tail = wsc->used_prev;
+		if (wsc->used_prev)
+			wsc->used_prev->used_next = wsc->used_next;
+		if (wsc->used_next)
+			wsc->used_next->used_prev = wsc->used_prev;
+
+		/* remove from wsconn_id_hash */
+		wsconn_listrm(wsconn_id_hash[wsc->id_hash], wsc, id_next, id_prev);
+
+		/* stat */
+		update_stat(ws_current_connections, -1);
+		if (wsc->sub_protocol == SUB_PROTOCOL_SIP)
+			update_stat(ws_sip_current_connections, -1);
+		else if (wsc->sub_protocol == SUB_PROTOCOL_MSRP)
+			update_stat(ws_msrp_current_connections, -1);
+
+		destroy = 1;
+	}
+	WSCONN_UNLOCK;
+
+	LM_DBG("wsconn_put end for [%p] refcnt [%d]\n", wsc, atomic_get(&wsc->refcnt));
+
+	/* wsc is removed from all lists and can be destroyed safely */
+	if (destroy)
+		wsconn_dtor(wsc);
+
+	return 0;
+}
+
 ws_connection_t *wsconn_get(int id)
 {
 	int id_hash = tcp_id_hash(id);
 	ws_connection_t *wsc;
 
+	LM_DBG("wsconn_get for id [%d]\n", id);
+
 	WSCONN_LOCK;
 	for (wsc = wsconn_id_hash[id_hash]; wsc; wsc = wsc->id_next)
 	{
 		if (wsc->id == id)
 		{
+			wsconn_ref(wsc);
+			LM_DBG("wsconn_get returns wsc [%p] refcnt [%d]\n", wsc, atomic_get(&wsc->refcnt));
+
 			WSCONN_UNLOCK;
+
 			return wsc;
 		}
 	}
@@ -385,6 +448,85 @@ ws_connection_t *wsconn_get(int id)
 	return NULL;
 }
 
+ws_connection_t **wsconn_get_list(void)
+{
+	ws_connection_t **list = NULL;
+	ws_connection_t *wsc   = NULL;
+	size_t list_size = 0;
+	size_t list_len  = 0;
+	size_t i = 0;
+
+	LM_DBG("wsconn_get_list\n");
+
+	WSCONN_LOCK;
+
+	/* get the number of used connections */
+	wsc = wsconn_used_list->head;
+	while (wsc)
+	{
+		LM_DBG("counter wsc [%p] prev => [%p] next => [%p]\n", wsc, wsc->used_prev, wsc->used_next);
+		list_len++;
+		wsc = wsc->used_next;
+	}
+
+	if (!list_len)
+		goto end;
+
+	/* allocate a NULL terminated list of wsconn pointers */
+	list_size = (list_len + 1) * sizeof(ws_connection_t *);
+	list = pkg_malloc(list_size);
+	if (!list)
+		goto end;
+
+	memset(list, 0, list_size);
+
+	/* copy */
+	wsc = wsconn_used_list->head;
+	for(i = 0; i < list_len; i++)
+	{
+		if (!wsc) {
+			LM_ERR("Wrong list length\n");
+		}
+
+		list[i] = wsc;
+		wsconn_ref(wsc);
+		LM_DBG("wsc [%p] id [%d] ref++\n", wsc, wsc->id);
+
+		wsc = wsc->used_next;
+	}
+	list[list_len] = NULL; /* explicit NULL termination */
+
+end:
+	WSCONN_UNLOCK;
+
+	LM_DBG("wsconn_get_list returns list [%p] with [%d] members\n", list, (int)list_len);
+
+	return list;
+}
+
+int wsconn_put_list(ws_connection_t **list_head)
+{
+	ws_connection_t **list = NULL;
+	ws_connection_t *wsc   = NULL;
+
+	LM_DBG("wsconn_put_list [%p]\n", list_head);
+
+	if (!list_head)
+		return -1;
+
+	list =  list_head;
+	wsc  = *list_head;
+	while (wsc)
+	{
+		wsconn_put(wsc);
+		wsc = *(++list);
+	}
+
+	pkg_free(list_head);
+
+	return 0;
+}
+
 static int add_node(struct mi_root *tree, ws_connection_t *wsc)
 {
 	int interval;
diff --git a/modules/websocket/ws_conn.h b/modules/websocket/ws_conn.h
index 0c7d639..27ba5ee 100644
--- a/modules/websocket/ws_conn.h
+++ b/modules/websocket/ws_conn.h
@@ -29,6 +29,8 @@
 #ifndef _WS_CONN_H
 #define _WS_CONN_H
 
+#include "../../atomic_ops.h"
+
 #include "../../lib/kcore/kstats_wrapper.h"
 #include "../../lib/kmi/tree.h"
 
@@ -57,6 +59,9 @@ typedef struct ws_connection
 	struct receive_info rcv;
 
 	unsigned int sub_protocol;
+
+	atomic_t refcnt;
+	int      run_event;
 } ws_connection_t;
 
 typedef struct
@@ -89,6 +94,9 @@ int wsconn_rm(ws_connection_t *wsc, ws_conn_eventroute_t run_event_route);
 int wsconn_update(ws_connection_t *wsc);
 void wsconn_close_now(ws_connection_t *wsc);
 ws_connection_t *wsconn_get(int id);
+int wsconn_put(ws_connection_t *wsc);
+ws_connection_t **wsconn_get_list(void);
+int wsconn_put_list(ws_connection_t **list);
 struct mi_root *ws_mi_dump(struct mi_root *cmd, void *param);
 
 #endif /* _WS_CONN_H */
diff --git a/modules/websocket/ws_frame.c b/modules/websocket/ws_frame.c
index ba0713b..7dc2669 100644
--- a/modules/websocket/ws_frame.c
+++ b/modules/websocket/ws_frame.c
@@ -240,7 +240,6 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
 		pkg_free(send_buf);
 		if (wsconn_rm(frame->wsc, WSCONN_EVENTROUTE_YES) < 0)
 			LM_ERR("removing WebSocket connection\n");
-		frame->wsc = NULL;
 		return -1;
 	}
 	init_dst_from_rcv(&dst, &con->rcv);
@@ -252,10 +251,8 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
 			LM_ERR("removing WebSocket connection\n");
 			tcpconn_put(con);
 			pkg_free(send_buf);
-			frame->wsc = NULL;
 			return -1;
 		}
-		frame->wsc = NULL;
 	}
 
 	if (dst.proto == PROTO_WS)
@@ -308,7 +305,6 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
 			update_stat(ws_msrp_failed_connections, 1);
 		if (wsconn_rm(frame->wsc, WSCONN_EVENTROUTE_YES) < 0)
 			LM_ERR("removing WebSocket connection\n");
-		frame->wsc = NULL;
 		tcpconn_put(con);
 		return -1;
 	}
@@ -394,20 +390,19 @@ static int close_connection(ws_connection_t **p_wsc, ws_close_type_t type,
 			else if (sub_proto == SUB_PROTOCOL_MSRP)
 				update_stat(ws_msrp_remote_closed_connections,
 						1);
-			*p_wsc = NULL;
 		}
 	}
 	else /* if (frame->wsc->state == WS_S_CLOSING) */
 	{
 		wsconn_close_now(wsc);
-		*p_wsc = NULL;
 	}
 
 	return 0;
 }
 
 static int decode_and_validate_ws_frame(ws_frame_t *frame,
-					tcp_event_info_t *tcpinfo)
+                                        tcp_event_info_t *tcpinfo,
+                                        short *err_code, str *err_text)
 {
 	unsigned int i, len = tcpinfo->len;
 	int mask_start, j;
@@ -415,21 +410,14 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 
 	LM_DBG("decoding WebSocket frame\n");
 
-	if ((frame->wsc = wsconn_get(tcpinfo->con->id)) == NULL)
-	{
-		LM_ERR("WebSocket connection not found\n");
-		return -1;
-	}
-
 	wsconn_update(frame->wsc);
 
 	/* Decode and validate first 9 bits */
 	if (len < 2)
 	{
 		LM_WARN("message is too short\n");
-		if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-					str_status_protocol_error) < 0)
-			LM_ERR("closing connection\n");
+		*err_code = 1002;
+		*err_text = str_status_protocol_error;
 		return -1;
 	}
 	frame->fin = (buf[0] & 0xff) & BYTE0_MASK_FIN;
@@ -443,18 +431,16 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 	{
 		LM_WARN("WebSocket fragmentation not supported in the sip "
 			"sub-protocol\n");
-		if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-					str_status_protocol_error) < 0)
-			LM_ERR("closing connection\n");
+		*err_code = 1002;
+		*err_text = str_status_protocol_error;
 		return -1;
 	}
 
 	if (frame->rsv1 || frame->rsv2 || frame->rsv3)
 	{
 		LM_WARN("WebSocket reserved fields with non-zero values\n");
-		if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-					str_status_protocol_error) < 0)
-			LM_ERR("closing connection\n");
+		*err_code = 1002;
+		*err_text = str_status_protocol_error;
 		return -1;
 	}
 
@@ -476,9 +462,8 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 	default:
 		LM_WARN("unsupported opcode: 0x%x\n",
 			(unsigned char) frame->opcode);
-		if (close_connection(&frame->wsc, LOCAL_CLOSE, 1008,
-					str_status_unsupported_opcode) < 0)
-			LM_ERR("closing connection\n");
+		*err_code = 1008;
+		*err_text = str_status_unsupported_opcode;
 		return -1;
 	}
 
@@ -486,9 +471,8 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 	{
 		LM_WARN("this is a server - all received messages must be "
 			"masked\n");
-		if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-					str_status_protocol_error) < 0)
-			LM_ERR("closing connection\n");
+		*err_code = 1002;
+		*err_text = str_status_protocol_error;
 		return -1;
 	}
 
@@ -499,9 +483,8 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 		if (len < 4)
 		{
 			LM_WARN("message is too short\n");
-			if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-						str_status_protocol_error) < 0)
-				LM_ERR("closing connection\n");
+			*err_code = 1002;
+			*err_text = str_status_protocol_error;
 			return -1;
 		}
 		mask_start = 4;
@@ -514,9 +497,8 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 		if (len < 10)
 		{
 			LM_WARN("message is too short\n");
-			if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-						str_status_protocol_error) < 0)
-				LM_ERR("closing connection\n");
+			*err_code = 1002;
+			*err_text = str_status_protocol_error;
 			return -1;
 		}
 		mask_start = 10;
@@ -525,9 +507,8 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 			|| (buf[4] & 0xff) != 0 || (buf[5] & 0xff) != 0)
 		{
 			LM_WARN("message is too long\n");
-			if (close_connection(&frame->wsc, LOCAL_CLOSE, 1009,
-						str_status_message_too_big) < 0)
-				LM_ERR("closing connection\n");
+			*err_code = 1009;
+			*err_text = str_status_message_too_big;
 			return -1;
 		}
 
@@ -553,9 +534,8 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
 	{
 		LM_WARN("message not complete frame size %u but received %u\n",
 			frame->payload_len + mask_start + 4, len);
-		if (close_connection(&frame->wsc, LOCAL_CLOSE, 1002,
-					str_status_protocol_error) < 0)
-			LM_ERR("closing connection\n");
+		*err_code = 1002;
+		*err_text = str_status_protocol_error;
 		return -1;
 	}
 	frame->payload_data = &buf[mask_start + 4];
@@ -632,6 +612,11 @@ int ws_frame_receive(void *data)
 	ws_frame_t frame;
 	tcp_event_info_t *tcpinfo = (tcp_event_info_t *) data;
 
+	int opcode      = -1;
+	int ret         = 0;
+	short err_code  = 0;
+	str   err_text  = {NULL, 0};
+
 	update_stat(ws_received_frames, 1);
 
 	if (tcpinfo == NULL || tcpinfo->buf == NULL || tcpinfo->len <= 0)
@@ -640,7 +625,26 @@ int ws_frame_receive(void *data)
 		return -1;
 	}
 
-	switch(decode_and_validate_ws_frame(&frame, tcpinfo))
+	/* wsc refcnt++ */
+	frame.wsc = wsconn_get(tcpinfo->con->id);
+	if (frame.wsc == NULL)
+	{
+		LM_ERR("WebSocket connection not found\n");
+		return -1;
+	}
+
+	opcode = decode_and_validate_ws_frame(&frame, tcpinfo, &err_code, &err_text);
+	if (opcode < 0)
+	{
+		if (close_connection(&frame.wsc, LOCAL_CLOSE, err_code, err_text) < 0)
+			LM_ERR("closing connection\n");
+
+		wsconn_put(frame.wsc);
+
+		return -1;
+	}
+
+	switch(opcode)
 	{
 	case OPCODE_TEXT_FRAME:
 	case OPCODE_BINARY_FRAME:
@@ -649,6 +653,9 @@ int ws_frame_receive(void *data)
 			LM_DBG("Rx SIP message:\n%.*s\n", frame.payload_len,
 				frame.payload_data);
 			update_stat(ws_sip_received_frames, 1);
+
+			wsconn_put(frame.wsc);
+
 			return receive_msg(frame.payload_data,
 						frame.payload_len,
 						tcpinfo->rcv);
@@ -667,30 +674,46 @@ int ws_frame_receive(void *data)
 				tev.len = frame.payload_len;
 				tev.rcv = tcpinfo->rcv;
 				tev.con = tcpinfo->con;
+
+				wsconn_put(frame.wsc);
+
 				return sr_event_exec(SREV_TCP_MSRP_FRAME,
 							(void *) &tev);
 			}
 			else
 			{
-				LM_ERR("no callback registerd for MSRP\n");
+				LM_ERR("no callback registered for MSRP\n");
+
+				wsconn_put(frame.wsc);
+
 				return -1;
 			}
 		}
 
 	case OPCODE_CLOSE:
-		return handle_close(&frame);
+		ret = handle_close(&frame);
+		if (frame.wsc) wsconn_put(frame.wsc);
+		return ret;
 
 	case OPCODE_PING:
-		return handle_ping(&frame);
+		ret = handle_ping(&frame);
+		if (frame.wsc) wsconn_put(frame.wsc);
+		return ret;
 
 	case OPCODE_PONG:
-		return handle_pong(&frame);
+		ret = handle_pong(&frame);
+		if (frame.wsc) wsconn_put(frame.wsc);
+		return ret;
 
 	default:
 		LM_WARN("received bad frame\n");
+		wsconn_put(frame.wsc);
 		return -1;
 	}
 
+	/* how can we get here ? */
+	wsconn_put(frame.wsc);
+
 	return 0;
 }
 
@@ -715,9 +738,14 @@ int ws_frame_transmit(void *data)
 	if (encode_and_send_ws_frame(&frame, CONN_CLOSE_DONT) < 0)
 	{	
 		LM_ERR("sending message\n");
+
+		wsconn_put(frame.wsc);
+
 		return -1;
 	}
 
+	wsconn_put(frame.wsc);
+
 	return 0;
 }
 
@@ -783,8 +811,11 @@ struct mi_root *ws_mi_close(struct mi_root *cmd, void *param)
 					str_status_bad_param.len);
 	}
 
-	if (close_connection(&wsc, LOCAL_CLOSE, 1000,
-				str_status_normal_closure) < 0)
+	int ret = close_connection(&wsc, LOCAL_CLOSE, 1000, str_status_normal_closure);
+
+	wsconn_put(wsc);
+
+	if (ret < 0)
 	{
 		LM_WARN("closing connection\n");
 		return init_mi_tree(500, str_status_error_closing.s,
@@ -834,7 +865,11 @@ static struct mi_root *mi_ping_pong(struct mi_root *cmd, void *param,
 					str_status_bad_param.len);
 	}
 
-	if (ping_pong(wsc, opcode) < 0)
+	int ret = ping_pong(wsc, opcode);
+
+	wsconn_put(wsc);
+
+	if (ret < 0)
 	{
 		LM_WARN("sending %s\n", OPCODE_PING ? "Ping" : "Pong");
 		return init_mi_tree(500, str_status_error_sending.s,
@@ -858,36 +893,55 @@ void ws_keepalive(unsigned int ticks, void *param)
 {
 	int check_time = (int) time(NULL)
 		- cfg_get(websocket, ws_cfg, keepalive_timeout);
-	ws_connection_t *wsc = wsconn_used_list->head;
 
+	ws_connection_t **list      = NULL,
+	                **list_head = NULL;
+	ws_connection_t *wsc   = NULL;
+
+	/* get an array of pointer to all ws connection */
+	list_head = wsconn_get_list();
+	if (!list_head)
+		return;
+
+	list =  list_head;
+	wsc  = *list_head;
 	while (wsc && wsc->last_used < check_time)
 	{
-		if (wsc->state == WS_S_CLOSING
-			|| wsc->awaiting_pong)
+		if (wsc->state == WS_S_CLOSING || wsc->awaiting_pong)
 		{
 			LM_WARN("forcibly closing connection\n");
 			wsconn_close_now(wsc);
 		}
 		else
-			ping_pong(wsconn_used_list->head,
-			  ws_keepalive_mechanism == KEEPALIVE_MECHANISM_PING
-					? OPCODE_PING : OPCODE_PONG);
-		wsc = wsconn_used_list->head;
+		{
+			int opcode = (ws_keepalive_mechanism == KEEPALIVE_MECHANISM_PING)
+			             ? OPCODE_PING
+			             : OPCODE_PONG;
+			ping_pong(wsc, opcode);
+		}
+
+		wsc = *(++list);
 	}
-	
+
+	wsconn_put_list(list_head);
 }
 
 int ws_close(sip_msg_t *msg)
 {
 	ws_connection_t *wsc;
+	int ret;
 
 	if ((wsc = wsconn_get(msg->rcv.proto_reserved1)) == NULL) {
 		LM_ERR("failed to retrieve WebSocket connection\n");
 		return -1;
 	}
 
-	return (close_connection(&wsc, LOCAL_CLOSE, 1000,
+	ret = (close_connection(&wsc, LOCAL_CLOSE, 1000,
 				 str_status_normal_closure) == 0) ? 1: 0;
+
+	wsconn_put(wsc);
+
+	return ret;
 }
 
 int ws_close2(sip_msg_t *msg, char *_status, char *_reason)
@@ -895,6 +949,7 @@ int ws_close2(sip_msg_t *msg, char *_status, char *_reason)
 	int status;
 	str reason;
 	ws_connection_t *wsc;
+	int ret;
 
 	if (get_int_fparam(&status, msg, (fparam_t *) _status) < 0) {
 		LM_ERR("failed to get status code\n");
@@ -911,7 +966,11 @@ int ws_close2(sip_msg_t *msg, char *_status, char *_reason)
 		return -1;
 	}
 
-	return (close_connection(&wsc, LOCAL_CLOSE, status, reason) == 0) ? 1: 0;
+	ret = (close_connection(&wsc, LOCAL_CLOSE, status, reason) == 0) ? 1: 0;
+
+	wsconn_put(wsc);
+
+	return ret;
 }
 
 int ws_close3(sip_msg_t *msg, char *_status, char *_reason, char *_con)
@@ -920,6 +979,7 @@ int ws_close3(sip_msg_t *msg, char *_status, char *_reason, char *_con)
 	str reason;
 	int con;
 	ws_connection_t *wsc;
+	int ret;
 
 	if (get_int_fparam(&status, msg, (fparam_t *) _status) < 0) {
 		LM_ERR("failed to get status code\n");
@@ -941,5 +1001,9 @@ int ws_close3(sip_msg_t *msg, char *_status, char *_reason, char *_con)
 		return -1;
 	}
 
-	return (close_connection(&wsc, LOCAL_CLOSE, status, reason) == 0) ? 1: 0;
+	ret = (close_connection(&wsc, LOCAL_CLOSE, status, reason) == 0) ? 1: 0;
+
+	wsconn_put(wsc);
+
+	return ret;
 }
diff --git a/modules/websocket/ws_handshake.c b/modules/websocket/ws_handshake.c
index 05332e4..e89fda1 100644
--- a/modules/websocket/ws_handshake.c
+++ b/modules/websocket/ws_handshake.c
@@ -427,8 +427,10 @@ int ws_handle_handshake(struct sip_msg *msg)
 				&headers) < 0)
 	{
 		if ((wsc = wsconn_get(msg->rcv.proto_reserved1)) != NULL)
+		{
 			wsconn_rm(wsc, WSCONN_EVENTROUTE_NO);
-
+			wsconn_put(wsc);
+		}
 		goto end;
 	}
 	else
diff --git a/parser/sdp/sdp.c b/parser/sdp/sdp.c
index fde60d3..1e53940 100644
--- a/parser/sdp/sdp.c
+++ b/parser/sdp/sdp.c
@@ -871,12 +871,13 @@ void print_sdp_stream(sdp_stream_cell_t *stream, int log_level)
 
 void print_sdp_session(sdp_session_cell_t *session, int log_level)
 {
-	sdp_stream_cell_t *stream = session->streams;
+	sdp_stream_cell_t *stream;
 
 	if (session==NULL) {
 		LM_ERR("NULL session\n");
 		return;
 	}
+	stream = session->streams;
 
 	LOG(log_level, "..session[%d]:%p=>%p '%.*s' '%.*s' '%.*s' '%.*s:%.*s' (%d)=>%p\n",
 		session->session_num, session, session->next,
diff --git a/parser/sdp/sdp_helpr_funcs.c b/parser/sdp/sdp_helpr_funcs.c
index a9eb315..bc96e99 100644
--- a/parser/sdp/sdp_helpr_funcs.c
+++ b/parser/sdp/sdp_helpr_funcs.c
@@ -204,6 +204,10 @@ other:
 
 
 
+/**
+ * rfc4566:
+ * a=rtpmap:<payload type> <encoding name>/<clock rate> [/<encoding parameters>]
+ */
 int extract_rtpmap(str *body,
 	str *rtpmap_payload, str *rtpmap_encoding, str *rtpmap_clockrate, str *rtpmap_parmas)
 {
@@ -241,30 +245,28 @@ int extract_rtpmap(str *body,
 
 	rtpmap_encoding->s = cp;
 	cp1 = (char*)ser_memmem(cp, "/", len, 1);
-	len -= cp1 - cp;
-	if (len <= 0 || cp == cp1) {
-		LM_ERR("invalid encoding in `a=rtpmap'\n");
+	if(cp1==NULL) {
+		LM_ERR("invalid encoding in `a=rtpmap' at [%.*s]\n", len, cp);
 		return -1;
 	}
+	len -= cp1 - cp;
 	rtpmap_encoding->len = cp1 - cp;
 
-	cp = cp1;
+	cp = cp1+1;  /* skip '/' */
+	len--;
+	rtpmap_clockrate->s = cp;
 	cp1 = (char*)ser_memmem(cp, "/", len, 1);
-	len -= cp1 - cp;
-	if (len <= 0) {
-		LM_ERR("invalid encoding in `a=rtpmap:'\n");
-		return -1;
-	}
-
-	rtpmap_clockrate->s = cp + 1; /* skip '/' */
-	rtpmap_clockrate->len = len -1; /* skip '/' */
-	if ( cp == cp1) {
+	if(cp1==NULL) {
+		/* no encoding parameters */
+		rtpmap_clockrate->len = len;
 		rtpmap_parmas->s = NULL;
 		rtpmap_parmas->len = 0;
-	} else {
-		rtpmap_parmas->s = cp1 + 1;
-		rtpmap_parmas->len = cp1 - cp;
+		return 0;
 	}
+	rtpmap_clockrate->len = cp1 - cp;
+	len -= cp1 - cp;
+	rtpmap_parmas->s = cp1 + 1;  /* skip '/' */
+	rtpmap_parmas->len = len - 1;
 	return 0;
 }
 
diff --git a/pkg/kamailio/centos/6/README b/pkg/kamailio/centos/6/README
new file mode 100644
index 0000000..8d61c17
--- /dev/null
+++ b/pkg/kamailio/centos/6/README
@@ -0,0 +1,27 @@
+The following modules are not included in CentOS 6 builds because they have
+dependencies that cannot be met by the base or EPEL CentOS YUM repos or are
+obsolete.
+
+Obsolete modules
+----------------
+* iptrtpproxy		use the rtpproxy-ng module with mediaproxy-ng instead
+* jabber		use the xmpp and pua_xmpp modules instead
+
+Modules with unmet dependencies
+-------------------------------
+Note: If you need any of these modules you will need to find (and possibly
+      build) and install the dependencies and then do a manual build of
+      Kamailio.
+
+Ordered by module name:
+* app_mono	requires mono-devel-??? or higher (EPEL contains
+		mono-devel 2.4.3.1)
+* db_cassandra	requires thrift 0.6.1 or 0.7.0
+* db_oracle	requires instantclient-sdk-10.2.0.3
+* osp		requires the OSP Toolkit
+
+Ordered by unmet dependency:
+* instantclient-sdk-10.2.0.3	db_oracle
+* mono-devel-??? or higher	app_mono
+* OSP Toolkit			osp
+* thrift 0.6.1 or 0.7.0		db_cassandra
diff --git a/pkg/kamailio/centos/6/kamailio.init b/pkg/kamailio/centos/6/kamailio.init
new file mode 100644
index 0000000..3ee9677
--- /dev/null
+++ b/pkg/kamailio/centos/6/kamailio.init
@@ -0,0 +1,134 @@
+#!/bin/bash
+#
+# Startup script for Kamailio
+#
+# chkconfig: 345 85 15
+# description: Kamailio (OpenSER) - the Open Source SIP Server
+#
+# processname: kamailio
+# pidfile: /var/run/kamailio.pid
+# config: /etc/kamailio/kamailio.cfg
+#
+### BEGIN INIT INFO
+# Provides: kamailio
+# Required-Start: $local_fs $network
+# Short-Description: Kamailio (OpenSER) - the Open Source SIP Server
+# Description: Kamailio (former OpenSER) is an Open Source SIP Server released
+# 	under GPL, able to handle thousands of call setups per second.
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+KAM=/usr/sbin/kamailio
+KAMCFG=/etc/kamailio/kamailio.cfg
+PROG=kamailio
+PID_FILE=/var/run/kamailio.pid
+LOCK_FILE=/var/lock/subsys/kamailio
+RETVAL=0
+DEFAULTS=/etc/sysconfig/kamailio
+RUN_KAMAILIO=no
+
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $KAMCFG; then
+        echo "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+        exit 1
+    fi
+}
+
+check_kamailio_config ()
+{
+        # Check if kamailio configuration is valid before starting the server
+        out=$($KAM -c 2>&1 > /dev/null)
+        retcode=$?
+        if [ "$retcode" != '0' ]; then
+            echo "Not starting $DESC: invalid configuration file!"
+            echo -e "\n$out\n"
+            exit 1
+        fi
+}
+
+
+start() {
+	check_kamailio_config
+        if [ "$1" != "debug" ]; then
+            check_fork
+        fi
+	echo -n $"Starting $PROG: "
+	daemon $KAM $OPTIONS >/dev/null 2>/dev/null
+	RETVAL=$?
+	[ $RETVAL = 0 ] && touch $LOCK_FILE && success
+	echo
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $PROG: "
+	killproc $KAM
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f $LOCK_FILE $PID_FILE
+}
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    echo "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=32
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    COREDIR=/tmp
+    echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+OPTIONS="-P $PID_FILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP $EXTRA_OPTIONS"
+
+
+# See how we were called.
+case "$1" in
+	start|debug)
+		start
+		;;
+	stop)
+		stop
+		;;
+	status)
+		status $KAM
+		RETVAL=$?
+		;;
+	restart)
+		stop
+		start
+		;;
+	condrestart)
+		if [ -f $PID_FILE ] ; then
+			stop
+			start
+		fi
+		;;
+	*)
+		echo $"Usage: $PROG {start|stop|restart|condrestart|status|debug|help}"
+		exit 1
+esac
+
+exit $RETVAL
diff --git a/pkg/kamailio/centos/6/kamailio.spec b/pkg/kamailio/centos/6/kamailio.spec
new file mode 100644
index 0000000..6f73f8d
--- /dev/null
+++ b/pkg/kamailio/centos/6/kamailio.spec
@@ -0,0 +1,1179 @@
+%define name	kamailio
+%define ver	4.1.4
+%define rel	0%{dist}
+
+
+
+Summary:	Kamailio (former OpenSER) - the Open Source SIP Server
+Name:		%name
+Version:	%ver
+Release:	%rel
+Packager:	Peter Dunkley <peter at dunkley.me.uk>
+License:	GPL
+Group:		System Environment/Daemons
+Source:		http://kamailio.org/pub/kamailio/%{ver}/src/%{name}-%{ver}_src.tar.gz
+URL:		http://kamailio.org/
+Vendor:		kamailio.org
+BuildRoot:	%{_tmppath}/%{name}-%{ver}-buildroot
+Conflicts:	kamailio-auth-ephemeral < %ver, kamailio-bdb < %ver
+Conflicts:	kamailio-carrierroute < %ver, kamailio-cpl < %ver
+Conflicts:	kamailio-dialplan < %ver, kamailio-dnssec < %ver
+Conflicts:	kamailio-geoip < %ver, kamailio-gzcompress < %ver
+Conflicts:	kamailio-ims < %ver, kamailio-java < %ver, kamailio-json < %ver
+Conflicts:	kamailio-lcr < %ver, kamailio-ldap < %ver, kamailio-lua < %ver
+Conflicts:	kamailio-memcached < %ver, kamailio-mysql < %ver
+Conflicts:	kamailio-outbound < %ver, kamailio-perl < %ver
+Conflicts:	kamailio-postgresql < %ver, kamailio-presence < %ver
+Conflicts:	kamailio-purple < %ver, kamailio-python < %ver
+Conflicts:	kamailio-radius < % ver, kamailio-redis < %ver
+Conflicts:	kamailio-regex < %ver, kamailio-sctp < %ver
+Conflicts:	kamailio-snmpstats < %ver, kamailio-sqlite < %ver
+Conflicts:	kamailio-tls < %ver, kamailio-unixodbc < %ver
+Conflicts:	kamailio-utils < %ver, kamailio-websocket < %ver
+Conflicts:	kamailio-xhttp-pi < %ver, kamailio-xmlops < %ver
+Conflicts:	kamailio-xmlrpc < %ver, kamailio-xmpp < %ver
+BuildRequires:	bison, flex, gcc, make, redhat-rpm-config
+
+%description
+Kamailio (former OpenSER) is an Open Source SIP Server released under GPL, able
+to handle thousands of call setups per second. Among features: asynchronous TCP,
+UDP and SCTP, secure communication via TLS for VoIP (voice, video); IPv4 and
+IPv6; SIMPLE instant messaging and presence with embedded XCAP server and MSRP
+relay; ENUM; DID and least cost routing; load balancing; routing fail-over;
+accounting, authentication and authorization; support for many backend systems
+such as MySQL, Postgres, Oracle, Radius, LDAP, Redis, Cassandra; XMLRPC control
+interface, SNMP monitoring. It can be used to build large VoIP servicing
+platforms or to scale up SIP-to-PSTN gateways, PBX systems or media servers
+like Asterisk™, FreeSWITCH™ or SEMS.
+
+
+%package	auth-ephemeral
+Summary:	Functions for authentication using ephemeral credentials.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description auth-ephemeral
+Functions for authentication using ephemeral credentials.
+
+
+%package	bdb
+Summary:	Berkeley database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	db4, kamailio = %ver
+BuildRequires:	db4-devel
+
+%description	bdb
+Berkeley database connectivity for Kamailio.
+
+
+%package	carrierroute
+Summary:	The carrierroute module for Kamailio.
+Group:		System Environment/Daemons
+Requires:	epel-release, libconfuse, kamailio = %ver
+BuildRequires:	epel-release, libconfuse-devel
+
+%description	carrierroute
+The carrierroute module for Kamailio.
+
+
+%package	cpl
+Summary:	CPL (Call Processing Language) interpreter for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	cpl
+CPL (Call Processing Language) interpreter for Kamailio.
+
+
+%package	dialplan
+Summary:	String translations based on rules for Kamailio.
+Group:		System Environment/Daemons
+Requires:	pcre, kamailio = %ver
+BuildRequires:	pcre-devel
+
+%description	dialplan
+String translations based on rules for Kamailio.
+
+
+%package	dnssec
+Summary:	DNSSEC support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	epel-release, dnssec-tools-libs, kamailio = %ver
+BuildRequires:	epel-release, dnssec-tools-libs-devel
+
+%description	dnssec
+DNSSEC support for Kamailio.
+
+
+%package	geoip
+Summary:	MaxMind GeoIP support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	epel-release, GeoIP, kamailio = %ver
+BuildRequires:	epel-release, GeoIP-devel
+
+%description	geoip
+MaxMind GeoIP support for Kamailio.
+
+
+%package	gzcompress
+Summary:	Compressed body (SIP and HTTP) handling for kamailio.
+Group:		System Environment/Daemons
+Requires:	zlib, kamailio = %ver
+BuildRequires:	zlib-devel
+
+%description	gzcompress
+Compressed body (SIP and HTTP) handling for kamailio.
+
+
+%package	ims
+Summary:	IMS modules and extensions module for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	ims
+IMS modules and extensions module for Kamailio.
+
+
+%package	java
+Summary:	Java extensions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libgcj, java-1.6.0-openjdk, kamailio = %ver
+BuildRequires:	libgcj-devel, java-1.6.0-openjdk-devel, ant
+
+%description	java
+Java extensions for Kamailio.
+
+
+%package	json
+Summary:	json string handling and RPC modules for Kamailio.
+Group:		System Environment/Daemons
+Requires:	epel-release, json-c, libevent, kamailio = %ver
+BuildRequires:	epel-release, json-c-devel, libevent-devel
+
+%description	json
+json string handling and RPC modules for Kamailio.
+
+
+%package	lcr
+Summary:	Least cost routing for Kamailio.
+Group:		System Environment/Daemons
+Requires:	pcre, kamailio = %ver
+BuildRequires:	pcre-devel
+
+%description	lcr
+Least cost routing for Kamailio.
+
+
+%package	ldap
+Summary:	LDAP search interface for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openldap, kamailio = %ver
+BuildRequires:	openldap-devel
+
+%description	ldap
+LDAP search interface for Kamailio.
+
+
+%package	lua
+Summary:	Lua extensions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	kamailio = %ver
+BuildRequires:	lua-devel
+
+%description	lua
+Lua extensions for Kamailio.
+
+
+%package	memcached
+Summary:	memcached configuration file support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libmemcached, kamailio = %ver
+BuildRequires:	libmemcached-devel
+
+%description	memcached
+memcached configuration file support for Kamailio.
+
+
+%package	mysql
+Summary:	MySQL database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	mysql-libs, kamailio = %ver
+BuildRequires:	mysql-devel zlib-devel
+
+%description	mysql
+MySQL database connectivity for Kamailio.
+
+
+%package	outbound
+Summary:	Outbound (RFC 5626) support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description	outbound
+RFC 5626, "Managing Client-Initiated Connections in the Session Initiation
+Protocol (SIP)" support for Kamailio.
+
+
+%package	perl
+Summary:	Perl extensions and database driver for Kamailio.
+Group:		System Environment/Daemons 
+Requires:	mod_perl, kamailio = %ver
+BuildRequires:	mod_perl-devel
+
+%description	perl
+Perl extensions and database driver for Kamailio.
+
+
+%package	postgresql
+Summary:	PostgreSQL database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	postgresql-libs, kamailio = %ver
+BuildRequires:	postgresql-devel
+
+%description	postgresql
+PostgreSQL database connectivity for Kamailio.
+
+
+%package	presence
+Summary:	SIP Presence (and RLS, XCAP, etc) support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, libcurl, kamailio = %ver, kamailio-xmpp = %ver
+BuildRequires:	libxml2-devel, libcurl-devel
+
+%description	presence
+SIP Presence (and RLS, XCAP, etc) support for Kamailio.
+
+
+%package	purple
+Summary:	Multi-protocol IM and presence gateway module.
+Group:		System Environment/Daemons
+Requires:	glib2, libpurple, libxml2, kamailio = %ver
+Requires:	kamailio-presence = %ver
+BuildRequires:	glib2-devel, libpurple-devel, libxml2-devel
+
+%description	purple
+Multi-protocol IM and presence gateway module.
+
+
+%package	python
+Summary:	Python extensions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	python, kamailio = %ver
+BuildRequires:	python-devel
+
+%description	python
+Python extensions for Kamailio.
+
+
+%package	radius
+Summary:	RADIUS modules for Kamailio.
+Group:		System Environment/Daemons
+Requires:	epel-release, radiusclient-ng, kamailio = %ver
+BuildRequires:	epel-release, radiusclient-ng-devel
+
+%description	radius
+RADIUS modules for Kamailio.
+
+
+%package	redis
+Summary:	Redis configuration file support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	epel-release, hiredis, kamailio = %ver
+BuildRequires:	epel-release, hiredis-devel
+
+%description	redis
+Redis configuration file support for Kamailio.
+
+
+%package	regex
+Summary:	PCRE mtaching operations for Kamailio.
+Group:		System Environment/Daemons
+Requires:	pcre, kamailio = %ver
+BuildRequires:	pcre-devel
+
+%description	regex
+PCRE mtaching operations for Kamailio.
+
+
+%package	sctp
+Summary:	SCTP transport for Kamailio.
+Group:		System Environment/Daemons
+Requires:	lksctp-tools, kamailio = %ver
+BuildRequires:	lksctp-tools-devel
+
+%description	sctp
+SCTP transport for Kamailio.
+
+
+%package	snmpstats
+Summary:	SNMP management interface (scalar statistics) for Kamailio.
+Group:		System Environment/Daemons
+Requires:	net-snmp-libs, kamailio = %ver
+BuildRequires:	net-snmp-devel
+
+%description	snmpstats
+SNMP management interface (scalar statistics) for Kamailio.
+
+
+%package	sqlite
+Summary:	SQLite database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	sqlite, kamailio = %ver
+BuildRequires:	sqlite-devel
+
+%description	sqlite
+SQLite database connectivity for Kamailio.
+
+
+%package	tls
+Summary:	TLS transport for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description	tls
+TLS transport for Kamailio.
+
+
+%package	unixodbc
+Summary:	unixODBC database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	unixODBC, kamailio = %ver
+BuildRequires:	unixODBC-devel
+
+%description	unixodbc
+unixODBC database connectivity for Kamailio.
+
+
+%package	utils
+Summary:	Non-SIP utitility functions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libcurl, libxml2, kamailio = %ver
+BuildRequires:	libcurl-devel, libxml2-devel
+
+%description	utils
+Non-SIP utitility functions for Kamailio.
+
+
+%package	websocket
+Summary:	WebSocket transport for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libunistring, openssl, kamailio = %ver
+BuildRequires:	libunistring-devel, openssl-devel
+
+%description	websocket
+WebSocket transport for Kamailio.
+
+
+%package	xhttp-pi
+Summary:	Web-provisioning interface for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	xhttp-pi
+Web-provisioning interface for Kamailio.
+
+
+%package	xmlops
+Summary:	XML operation functions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	xmlops
+XML operation functions for Kamailio.
+
+
+%package	xmlrpc
+Summary:	XMLRPC transport and encoding for Kamailio RPCs and MI commands.
+Group:		System Environment/Daemons
+Requires:	libxml2, xmlrpc-c, kamailio = %ver
+BuildRequires:	libxml2-devel, xmlrpc-c-devel
+
+%description	xmlrpc
+XMLRPC transport and encoding for Kamailio RPCs and MI commands.
+
+
+%package	xmpp
+Summary:	SIP/XMPP IM gateway for Kamailio.
+Group:		System Environment/Daemons
+Requires:	expat, kamailio = %ver
+BuildRequires:	expat-devel
+
+%description	xmpp
+SIP/XMPP IM gateway for Kamailio.
+
+
+
+%prep
+%setup -n %{name}-%{ver}
+
+
+
+%build
+make cfg prefix=/usr cfg_prefix=$RPM_BUILD_ROOT basedir=$RPM_BUILD_ROOT \
+	cfg_target=/%{_sysconfdir}/kamailio/ modules_dirs="modules"
+make
+make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
+	jabber osp" \
+	group_include="kstandard kautheph kberkeley kcarrierroute kcpl \
+	kdnssec kgeoip kims kjava kjson kldap klua kmemcached kmi_xmlrpc \
+	kmysql koutbound kperl kpostgres kpresence kpurple kpython kradius \
+	kredis ksctp ksnmpstats ksqlite ktls kunixodbc kutils kwebsocket \
+	kxml kxmpp" 
+cd modules/app_java/kamailio_java_folder/java
+ant
+cd ../../../..
+make utils
+
+
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install
+make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
+	iptrtpproxy jabber osp" \
+	group_include="kstandard kautheph kberkeley kcarrierroute kcpl \
+	kdnssec kgeoip kims kjava kjson kldap klua kmemcached kmi_xmlrpc \
+	kmysql koutbound kperl kpostgres kpresence kpurple kpython kradius \
+	kredis ksctp ksnmpstats ksqlite ktls kunixodbc kutils kwebsocket \
+	kxml kxmpp" 
+
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/kamailio/java
+install -m644 modules/app_java/kamailio_java_folder/java/Kamailio.class \
+	$RPM_BUILD_ROOT/%{_libdir}/kamailio/java
+install -m644 modules/app_java/kamailio_java_folder/java/kamailio.jar \
+	$RPM_BUILD_ROOT/%{_libdir}/kamailio/java
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+install -m755 pkg/kamailio/centos/%{?centos}/kamailio.init \
+		$RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/kamailio
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
+install -m644 pkg/kamailio/centos/%{?centos}/kamailio.sysconfig \
+		$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/kamailio
+
+
+
+%pre
+/usr/sbin/groupadd -r kamailio 2> /dev/null || :
+/usr/sbin/useradd -r -g kamailio -s /bin/false -c "Kamailio daemon" -d \
+		%{_libdir}/kamailio kamailio 2> /dev/null || :
+
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+
+%post
+/sbin/chkconfig --add kamailio
+
+
+
+%preun
+if [ $1 = 0 ]; then
+	/sbin/service kamailio stop > /dev/null 2>&1
+	/sbin/chkconfig --del kamailio
+fi
+
+
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/kamailio
+%doc %{_docdir}/kamailio/AUTHORS
+%doc %{_docdir}/kamailio/NEWS
+%doc %{_docdir}/kamailio/INSTALL
+%doc %{_docdir}/kamailio/README
+%doc %{_docdir}/kamailio/README-MODULES
+
+%dir %{_docdir}/kamailio/modules
+%doc %{_docdir}/kamailio/modules/README.acc
+%doc %{_docdir}/kamailio/modules/README.alias_db
+%doc %{_docdir}/kamailio/modules/README.async
+%doc %{_docdir}/kamailio/modules/README.auth
+%doc %{_docdir}/kamailio/modules/README.auth_db
+%doc %{_docdir}/kamailio/modules/README.auth_diameter
+%doc %{_docdir}/kamailio/modules/README.avp
+%doc %{_docdir}/kamailio/modules/README.avpops
+%doc %{_docdir}/kamailio/modules/README.benchmark
+%doc %{_docdir}/kamailio/modules/README.blst
+%doc %{_docdir}/kamailio/modules/README.call_control
+%doc %{_docdir}/kamailio/modules/README.cfg_db
+%doc %{_docdir}/kamailio/modules/README.cfg_rpc
+%doc %{_docdir}/kamailio/modules/README.cfgutils
+%doc %{_docdir}/kamailio/modules/README.cnxcc
+%doc %{_docdir}/kamailio/modules/README.corex
+%doc %{_docdir}/kamailio/modules/README.counters
+%doc %{_docdir}/kamailio/modules/README.ctl
+%doc %{_docdir}/kamailio/modules/README.db_cluster
+%doc %{_docdir}/kamailio/modules/README.db_flatstore
+%doc %{_docdir}/kamailio/modules/README.db_text
+%doc %{_docdir}/kamailio/modules/README.db2_ops
+%doc %{_docdir}/kamailio/modules/README.debugger
+%doc %{_docdir}/kamailio/modules/README.dialog
+%doc %{_docdir}/kamailio/modules/README.dialog_ng
+%doc %{_docdir}/kamailio/modules/README.dispatcher
+%doc %{_docdir}/kamailio/modules/README.diversion
+%doc %{_docdir}/kamailio/modules/README.dmq
+%doc %{_docdir}/kamailio/modules/README.domain
+%doc %{_docdir}/kamailio/modules/README.domainpolicy
+%doc %{_docdir}/kamailio/modules/README.drouting
+%doc %{_docdir}/kamailio/modules/README.enum
+%doc %{_docdir}/kamailio/modules/README.exec
+%doc %{_docdir}/kamailio/modules/README.group
+%doc %{_docdir}/kamailio/modules/README.htable
+%doc %{_docdir}/kamailio/modules/README.imc
+%doc %{_docdir}/kamailio/modules/README.ipops
+%doc %{_docdir}/kamailio/modules/README.kex
+%doc %{_docdir}/kamailio/modules/README.malloc_test
+%doc %{_docdir}/kamailio/modules/README.mangler
+%doc %{_docdir}/kamailio/modules/README.matrix
+%doc %{_docdir}/kamailio/modules/README.maxfwd
+%doc %{_docdir}/kamailio/modules/README.mediaproxy
+%doc %{_docdir}/kamailio/modules/README.mi_datagram
+%doc %{_docdir}/kamailio/modules/README.mi_fifo
+%doc %{_docdir}/kamailio/modules/README.mi_rpc
+%doc %{_docdir}/kamailio/modules/README.mohqueue
+%doc %{_docdir}/kamailio/modules/README.mqueue
+%doc %{_docdir}/kamailio/modules/README.msilo
+%doc %{_docdir}/kamailio/modules/README.msrp
+%doc %{_docdir}/kamailio/modules/README.mtree
+%doc %{_docdir}/kamailio/modules/README.nat_traversal
+%doc %{_docdir}/kamailio/modules/README.nathelper
+%doc %{_docdir}/kamailio/modules/README.p_usrloc
+%doc %{_docdir}/kamailio/modules/README.path
+%doc %{_docdir}/kamailio/modules/README.pdb
+%doc %{_docdir}/kamailio/modules/README.pdt
+%doc %{_docdir}/kamailio/modules/README.permissions
+%doc %{_docdir}/kamailio/modules/README.pike
+%doc %{_docdir}/kamailio/modules/README.pipelimit
+%doc %{_docdir}/kamailio/modules/README.prefix_route
+%doc %{_docdir}/kamailio/modules/README.print
+%doc %{_docdir}/kamailio/modules/README.print_lib
+%doc %{_docdir}/kamailio/modules/README.pv
+%doc %{_docdir}/kamailio/modules/README.qos
+%doc %{_docdir}/kamailio/modules/README.ratelimit
+%doc %{_docdir}/kamailio/modules/README.registrar
+%doc %{_docdir}/kamailio/modules/README.rr
+%doc %{_docdir}/kamailio/modules/README.rtimer
+%doc %{_docdir}/kamailio/modules/README.rtpproxy
+%doc %{_docdir}/kamailio/modules/README.rtpproxy-ng
+%doc %{_docdir}/kamailio/modules/README.sanity
+%doc %{_docdir}/kamailio/modules/README.sca
+%doc %{_docdir}/kamailio/modules/README.sdpops
+%doc %{_docdir}/kamailio/modules/README.seas
+%doc %{_docdir}/kamailio/modules/README.sipcapture
+%doc %{_docdir}/kamailio/modules/README.sipt
+%doc %{_docdir}/kamailio/modules/README.siptrace
+%doc %{_docdir}/kamailio/modules/README.siputils
+%doc %{_docdir}/kamailio/modules/README.sl
+%doc %{_docdir}/kamailio/modules/README.sms
+%doc %{_docdir}/kamailio/modules/README.speeddial
+%doc %{_docdir}/kamailio/modules/README.sqlops
+%doc %{_docdir}/kamailio/modules/README.sst
+%doc %{_docdir}/kamailio/modules/README.statistics
+%doc %{_docdir}/kamailio/modules/README.stun
+%doc %{_docdir}/kamailio/modules/README.textops
+%doc %{_docdir}/kamailio/modules/README.textopsx
+%doc %{_docdir}/kamailio/modules/README.timer
+%doc %{_docdir}/kamailio/modules/README.tm
+%doc %{_docdir}/kamailio/modules/README.tmrec
+%doc %{_docdir}/kamailio/modules/README.tmx
+%doc %{_docdir}/kamailio/modules/README.topoh
+%doc %{_docdir}/kamailio/modules/README.uac
+%doc %{_docdir}/kamailio/modules/README.uac_redirect
+%doc %{_docdir}/kamailio/modules/README.uid_auth_db
+%doc %{_docdir}/kamailio/modules/README.uid_avp_db
+%doc %{_docdir}/kamailio/modules/README.uid_domain
+%doc %{_docdir}/kamailio/modules/README.uid_gflags
+%doc %{_docdir}/kamailio/modules/README.uid_uri_db
+%doc %{_docdir}/kamailio/modules/README.uri_db
+%doc %{_docdir}/kamailio/modules/README.userblacklist
+%doc %{_docdir}/kamailio/modules/README.usrloc
+%doc %{_docdir}/kamailio/modules/README.xhttp
+%doc %{_docdir}/kamailio/modules/README.xhttp_rpc
+%doc %{_docdir}/kamailio/modules/README.xlog
+%doc %{_docdir}/kamailio/modules/README.xprint
+
+%dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio
+%config(noreplace) %{_sysconfdir}/kamailio/*
+%config %{_sysconfdir}/rc.d/init.d/*
+%config %{_sysconfdir}/sysconfig/*
+
+%dir %{_libdir}/kamailio
+%{_libdir}/kamailio/libbinrpc.so
+%{_libdir}/kamailio/libbinrpc.so.0
+%{_libdir}/kamailio/libbinrpc.so.0.1
+%{_libdir}/kamailio/libkcore.so
+%{_libdir}/kamailio/libkcore.so.1
+%{_libdir}/kamailio/libkcore.so.1.0
+%{_libdir}/kamailio/libkmi.so
+%{_libdir}/kamailio/libkmi.so.1
+%{_libdir}/kamailio/libkmi.so.1.0
+%{_libdir}/kamailio/libprint.so
+%{_libdir}/kamailio/libprint.so.1
+%{_libdir}/kamailio/libprint.so.1.2
+%{_libdir}/kamailio/libsrdb1.so
+%{_libdir}/kamailio/libsrdb1.so.1
+%{_libdir}/kamailio/libsrdb1.so.1.0
+%{_libdir}/kamailio/libsrdb2.so
+%{_libdir}/kamailio/libsrdb2.so.1
+%{_libdir}/kamailio/libsrdb2.so.1.0
+%{_libdir}/kamailio/libsrutils.so
+%{_libdir}/kamailio/libsrutils.so.1
+%{_libdir}/kamailio/libsrutils.so.1.0
+%{_libdir}/kamailio/libtrie.so
+%{_libdir}/kamailio/libtrie.so.1
+%{_libdir}/kamailio/libtrie.so.1.0
+
+%dir %{_libdir}/kamailio/modules
+%{_libdir}/kamailio/modules/acc.so
+%{_libdir}/kamailio/modules/alias_db.so
+%{_libdir}/kamailio/modules/async.so
+%{_libdir}/kamailio/modules/auth.so
+%{_libdir}/kamailio/modules/auth_db.so
+%{_libdir}/kamailio/modules/auth_diameter.so
+%{_libdir}/kamailio/modules/avp.so
+%{_libdir}/kamailio/modules/avpops.so
+%{_libdir}/kamailio/modules/benchmark.so
+%{_libdir}/kamailio/modules/blst.so
+%{_libdir}/kamailio/modules/call_control.so
+%{_libdir}/kamailio/modules/cfg_db.so
+%{_libdir}/kamailio/modules/cfg_rpc.so
+%{_libdir}/kamailio/modules/cfgutils.so
+%{_libdir}/kamailio/modules/cnxcc.so
+%{_libdir}/kamailio/modules/corex.so
+%{_libdir}/kamailio/modules/counters.so
+%{_libdir}/kamailio/modules/ctl.so
+%{_libdir}/kamailio/modules/db_cluster.so
+%{_libdir}/kamailio/modules/db_flatstore.so
+%{_libdir}/kamailio/modules/db_text.so
+%{_libdir}/kamailio/modules/db2_ops.so
+%{_libdir}/kamailio/modules/debugger.so
+%{_libdir}/kamailio/modules/dialog.so
+%{_libdir}/kamailio/modules/dialog_ng.so
+%{_libdir}/kamailio/modules/dispatcher.so
+%{_libdir}/kamailio/modules/diversion.so
+%{_libdir}/kamailio/modules/dmq.so
+%{_libdir}/kamailio/modules/domain.so
+%{_libdir}/kamailio/modules/domainpolicy.so
+%{_libdir}/kamailio/modules/drouting.so
+%{_libdir}/kamailio/modules/enum.so
+%{_libdir}/kamailio/modules/exec.so
+%{_libdir}/kamailio/modules/group.so
+%{_libdir}/kamailio/modules/htable.so
+%{_libdir}/kamailio/modules/imc.so
+%{_libdir}/kamailio/modules/ipops.so
+%{_libdir}/kamailio/modules/kex.so
+%{_libdir}/kamailio/modules/malloc_test.so
+%{_libdir}/kamailio/modules/mangler.so
+%{_libdir}/kamailio/modules/matrix.so
+%{_libdir}/kamailio/modules/maxfwd.so
+%{_libdir}/kamailio/modules/mediaproxy.so
+%{_libdir}/kamailio/modules/mi_datagram.so
+%{_libdir}/kamailio/modules/mi_fifo.so
+%{_libdir}/kamailio/modules/mi_rpc.so
+%{_libdir}/kamailio/modules/mohqueue.so
+%{_libdir}/kamailio/modules/mqueue.so
+%{_libdir}/kamailio/modules/msilo.so
+%{_libdir}/kamailio/modules/msrp.so
+%{_libdir}/kamailio/modules/mtree.so
+%{_libdir}/kamailio/modules/nat_traversal.so
+%{_libdir}/kamailio/modules/nathelper.so
+%{_libdir}/kamailio/modules/p_usrloc.so
+%{_libdir}/kamailio/modules/path.so
+%{_libdir}/kamailio/modules/pdb.so
+%{_libdir}/kamailio/modules/pdt.so
+%{_libdir}/kamailio/modules/permissions.so
+%{_libdir}/kamailio/modules/pike.so
+%{_libdir}/kamailio/modules/pipelimit.so
+%{_libdir}/kamailio/modules/prefix_route.so
+%{_libdir}/kamailio/modules/print.so
+%{_libdir}/kamailio/modules/print_lib.so
+%{_libdir}/kamailio/modules/pv.so
+%{_libdir}/kamailio/modules/qos.so
+%{_libdir}/kamailio/modules/ratelimit.so
+%{_libdir}/kamailio/modules/registrar.so
+%{_libdir}/kamailio/modules/rr.so
+%{_libdir}/kamailio/modules/rtimer.so
+%{_libdir}/kamailio/modules/rtpproxy.so
+%{_libdir}/kamailio/modules/rtpproxy-ng.so
+%{_libdir}/kamailio/modules/sanity.so
+%{_libdir}/kamailio/modules/sca.so
+%{_libdir}/kamailio/modules/sdpops.so
+%{_libdir}/kamailio/modules/seas.so
+%{_libdir}/kamailio/modules/sipcapture.so
+%{_libdir}/kamailio/modules/sipt.so
+%{_libdir}/kamailio/modules/siptrace.so
+%{_libdir}/kamailio/modules/siputils.so
+%{_libdir}/kamailio/modules/sl.so
+%{_libdir}/kamailio/modules/sms.so
+%{_libdir}/kamailio/modules/speeddial.so
+%{_libdir}/kamailio/modules/sqlops.so
+%{_libdir}/kamailio/modules/sst.so
+%{_libdir}/kamailio/modules/statistics.so
+%{_libdir}/kamailio/modules/stun.so
+%{_libdir}/kamailio/modules/textops.so
+%{_libdir}/kamailio/modules/textopsx.so
+%{_libdir}/kamailio/modules/timer.so
+%{_libdir}/kamailio/modules/tm.so
+%{_libdir}/kamailio/modules/tmrec.so
+%{_libdir}/kamailio/modules/tmx.so
+%{_libdir}/kamailio/modules/topoh.so
+%{_libdir}/kamailio/modules/uac.so
+%{_libdir}/kamailio/modules/uac_redirect.so
+%{_libdir}/kamailio/modules/uid_auth_db.so
+%{_libdir}/kamailio/modules/uid_avp_db.so
+%{_libdir}/kamailio/modules/uid_domain.so
+%{_libdir}/kamailio/modules/uid_gflags.so
+%{_libdir}/kamailio/modules/uid_uri_db.so
+%{_libdir}/kamailio/modules/uri_db.so
+%{_libdir}/kamailio/modules/userblacklist.so
+%{_libdir}/kamailio/modules/usrloc.so
+%{_libdir}/kamailio/modules/xhttp.so
+%{_libdir}/kamailio/modules/xhttp_rpc.so
+%{_libdir}/kamailio/modules/xlog.so
+%{_libdir}/kamailio/modules/xprint.so
+
+%{_sbindir}/kamailio
+%{_sbindir}/kamctl
+%{_sbindir}/kamdbctl
+%{_sbindir}/kamcmd
+
+%dir %{_libdir}/kamailio/kamctl
+%{_libdir}/kamailio/kamctl/kamctl.base
+%{_libdir}/kamailio/kamctl/kamctl.ctlbase
+%{_libdir}/kamailio/kamctl/kamctl.dbtext
+%{_libdir}/kamailio/kamctl/kamctl.fifo
+%{_libdir}/kamailio/kamctl/kamctl.ser
+%{_libdir}/kamailio/kamctl/kamctl.ser_mi
+%{_libdir}/kamailio/kamctl/kamctl.sqlbase
+%{_libdir}/kamailio/kamctl/kamctl.unixsock
+%{_libdir}/kamailio/kamctl/kamdbctl.base
+%{_libdir}/kamailio/kamctl/kamdbctl.dbtext
+
+%dir %{_libdir}/kamailio/kamctl/dbtextdb
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.py
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyc
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyo
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+%dir %{_datadir}/kamailio
+%dir %{_datadir}/kamailio/dbtext
+%dir %{_datadir}/kamailio/dbtext/kamailio
+%{_datadir}/kamailio/dbtext/kamailio/*
+
+
+%files		auth-ephemeral
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.auth_ephemeral
+%{_libdir}/kamailio/modules/auth_ephemeral.so
+
+
+%files		bdb
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_berkeley
+%{_sbindir}/kambdb_recover
+%{_libdir}/kamailio/modules/db_berkeley.so
+%{_libdir}/kamailio/kamctl/kamctl.db_berkeley
+%{_libdir}/kamailio/kamctl/kamdbctl.db_berkeley
+%dir %{_datadir}/kamailio/db_berkeley
+%{_datadir}/kamailio/db_berkeley/*
+
+
+%files		carrierroute
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.carrierroute
+%{_libdir}/kamailio/modules/carrierroute.so
+
+
+%files		cpl
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.cpl-c
+%{_libdir}/kamailio/modules/cpl-c.so
+
+
+%files		dialplan
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.dialplan
+%{_libdir}/kamailio/modules/dialplan.so
+
+
+%files		dnssec
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.dnssec
+%{_libdir}/kamailio/modules/dnssec.so
+
+
+%files		geoip
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.geoip
+%{_libdir}/kamailio/modules/geoip.so
+
+
+%files		gzcompress
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.gzcompress
+%{_libdir}/kamailio/modules/gzcompress.so
+
+
+%files		ims
+%defattr(-,root,root)
+%{_libdir}/kamailio/libkamailio_ims.so
+%{_libdir}/kamailio/libkamailio_ims.so.0
+%{_libdir}/kamailio/libkamailio_ims.so.0.1
+
+%doc %{_docdir}/kamailio/modules/README.cdp
+%doc %{_docdir}/kamailio/modules/README.cdp_avp
+%doc %{_docdir}/kamailio/modules/README.ims_auth
+%doc %{_docdir}/kamailio/modules/README.ims_charging
+%doc %{_docdir}/kamailio/modules/README.ims_icscf
+%doc %{_docdir}/kamailio/modules/README.ims_isc
+%doc %{_docdir}/kamailio/modules/README.ims_qos
+#%doc %{_docdir}/kamailio/modules/README.ims_registrar_pcscf
+#%doc %{_docdir}/kamailio/modules/README.ims_registrar_scscf
+%doc %{_docdir}/kamailio/modules/README.ims_usrloc_pcscf
+#%doc %{_docdir}/kamailio/modules/README.ims_usrloc_scscf
+%{_libdir}/kamailio/modules/cdp.so
+%{_libdir}/kamailio/modules/cdp_avp.so
+%{_libdir}/kamailio/modules/ims_auth.so
+%{_libdir}/kamailio/modules/ims_charging.so
+%{_libdir}/kamailio/modules/ims_icscf.so
+%{_libdir}/kamailio/modules/ims_isc.so
+%{_libdir}/kamailio/modules/ims_qos.so
+%{_libdir}/kamailio/modules/ims_registrar_pcscf.so
+%{_libdir}/kamailio/modules/ims_registrar_scscf.so
+%{_libdir}/kamailio/modules/ims_usrloc_pcscf.so
+%{_libdir}/kamailio/modules/ims_usrloc_scscf.so
+
+
+%files		java
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_java
+%{_libdir}/kamailio/modules/app_java.so
+%dir %{_libdir}/kamailio/java
+%{_libdir}/kamailio/java/Kamailio.class
+%{_libdir}/kamailio/java/kamailio.jar
+
+
+%files		json
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.json
+%doc %{_docdir}/kamailio/modules/README.jsonrpc-c
+%{_libdir}/kamailio/modules/json.so
+%{_libdir}/kamailio/modules/jsonrpc-c.so
+
+
+%files		lcr
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.lcr
+%{_libdir}/kamailio/modules/lcr.so
+
+
+%files		ldap
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db2_ldap
+%doc %{_docdir}/kamailio/modules/README.h350
+%doc %{_docdir}/kamailio/modules/README.ldap
+%{_libdir}/kamailio/modules/db2_ldap.so
+%{_libdir}/kamailio/modules/h350.so
+%{_libdir}/kamailio/modules/ldap.so
+
+
+%files		lua
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_lua
+%{_libdir}/kamailio/modules/app_lua.so
+
+
+%files		memcached
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.memcached
+%{_libdir}/kamailio/modules/memcached.so
+
+
+%files		mysql
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_mysql
+%{_libdir}/kamailio/modules/db_mysql.so
+%{_libdir}/kamailio/kamctl/kamctl.mysql
+%{_libdir}/kamailio/kamctl/kamdbctl.mysql
+%dir %{_datadir}/kamailio/mysql
+%{_datadir}/kamailio/mysql/*
+
+
+%files		outbound
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.outbound
+%{_libdir}/kamailio/modules/outbound.so
+
+
+%files		perl
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_perl
+%doc %{_docdir}/kamailio/modules/README.db_perlvdb
+%{_libdir}/kamailio/modules/app_perl.so
+%{_libdir}/kamailio/modules/db_perlvdb.so
+%dir %{_libdir}/kamailio/perl
+%{_libdir}/kamailio/perl/Kamailio.pm
+%dir %{_libdir}/kamailio/perl/Kamailio
+%{_libdir}/kamailio/perl/Kamailio/Constants.pm
+%{_libdir}/kamailio/perl/Kamailio/Message.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/LDAPUtils
+%{_libdir}/kamailio/perl/Kamailio/LDAPUtils/LDAPConf.pm
+%{_libdir}/kamailio/perl/Kamailio/LDAPUtils/LDAPConnection.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/Utils
+%{_libdir}/kamailio/perl/Kamailio/Utils/Debug.pm
+%{_libdir}/kamailio/perl/Kamailio/Utils/PhoneNumbers.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/VDB
+%{_libdir}/kamailio/perl/Kamailio/VDB/Column.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Pair.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/ReqCond.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Result.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/VTab.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Value.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/VDB/Adapter
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/AccountingSIPtrace.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Alias.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Auth.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Describe.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Speeddial.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/TableVersions.pm
+
+
+%files		postgresql
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_postgres
+%{_libdir}/kamailio/modules/db_postgres.so
+%{_libdir}/kamailio/kamctl/kamctl.pgsql
+%{_libdir}/kamailio/kamctl/kamdbctl.pgsql
+%dir %{_datadir}/kamailio/postgres
+%{_datadir}/kamailio/postgres/*
+
+
+%files		presence
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.presence
+%doc %{_docdir}/kamailio/modules/README.presence_conference
+%doc %{_docdir}/kamailio/modules/README.presence_dialoginfo
+%doc %{_docdir}/kamailio/modules/README.presence_mwi
+%doc %{_docdir}/kamailio/modules/README.presence_profile
+%doc %{_docdir}/kamailio/modules/README.presence_reginfo
+%doc %{_docdir}/kamailio/modules/README.presence_xml
+%doc %{_docdir}/kamailio/modules/README.pua
+%doc %{_docdir}/kamailio/modules/README.pua_bla
+%doc %{_docdir}/kamailio/modules/README.pua_dialoginfo
+%doc %{_docdir}/kamailio/modules/README.pua_mi
+%doc %{_docdir}/kamailio/modules/README.pua_reginfo
+%doc %{_docdir}/kamailio/modules/README.pua_usrloc
+%doc %{_docdir}/kamailio/modules/README.pua_xmpp
+%doc %{_docdir}/kamailio/modules/README.rls
+%doc %{_docdir}/kamailio/modules/README.xcap_client
+%doc %{_docdir}/kamailio/modules/README.xcap_server
+%{_libdir}/kamailio/modules/presence.so
+%{_libdir}/kamailio/modules/presence_conference.so
+%{_libdir}/kamailio/modules/presence_dialoginfo.so
+%{_libdir}/kamailio/modules/presence_mwi.so
+%{_libdir}/kamailio/modules/presence_profile.so
+%{_libdir}/kamailio/modules/presence_reginfo.so
+%{_libdir}/kamailio/modules/presence_xml.so
+%{_libdir}/kamailio/modules/pua.so
+%{_libdir}/kamailio/modules/pua_bla.so
+%{_libdir}/kamailio/modules/pua_dialoginfo.so
+%{_libdir}/kamailio/modules/pua_mi.so
+%{_libdir}/kamailio/modules/pua_reginfo.so
+%{_libdir}/kamailio/modules/pua_usrloc.so
+%{_libdir}/kamailio/modules/pua_xmpp.so
+%{_libdir}/kamailio/modules/rls.so
+%{_libdir}/kamailio/modules/xcap_client.so
+%{_libdir}/kamailio/modules/xcap_server.so
+
+
+%files		purple
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.purple
+%{_libdir}/kamailio/modules/purple.so
+
+
+%files		python
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_python
+%{_libdir}/kamailio/modules/app_python.so
+
+
+%files		radius
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.acc_radius
+%doc %{_docdir}/kamailio/modules/README.auth_radius
+%doc %{_docdir}/kamailio/modules/README.misc_radius
+%doc %{_docdir}/kamailio/modules/README.peering
+%{_libdir}/kamailio/modules/acc_radius.so
+%{_libdir}/kamailio/modules/auth_radius.so
+%{_libdir}/kamailio/modules/misc_radius.so
+%{_libdir}/kamailio/modules/peering.so
+
+
+%files		redis
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.ndb_redis
+%{_libdir}/kamailio/modules/ndb_redis.so
+
+
+%files		regex
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.regex
+%{_libdir}/kamailio/modules/regex.so
+
+
+%files		sctp
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.sctp
+%{_libdir}/kamailio/modules/sctp.so
+
+
+%files		snmpstats
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.snmpstats
+%{_libdir}/kamailio/modules/snmpstats.so
+
+
+%files		sqlite
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_sqlite
+%{_libdir}/kamailio/modules/db_sqlite.so
+%{_libdir}/kamailio/kamctl/kamctl.sqlite
+%{_libdir}/kamailio/kamctl/kamdbctl.sqlite
+%dir %{_datadir}/kamailio/db_sqlite
+%{_datadir}/kamailio/db_sqlite/*
+
+
+%files		tls
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.auth_identity
+%doc %{_docdir}/kamailio/modules/README.tls
+%{_libdir}/kamailio/modules/auth_identity.so
+%{_libdir}/kamailio/modules/tls.so
+
+
+%files		unixodbc
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_unixodbc
+%{_libdir}/kamailio/modules/db_unixodbc.so
+
+
+%files		utils
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.utils
+%{_libdir}/kamailio/modules/utils.so
+
+
+%files		websocket
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.websocket
+%{_libdir}/kamailio/modules/websocket.so
+
+
+%files		xhttp-pi
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xhttp_pi
+%{_libdir}/kamailio/modules/xhttp_pi.so
+%dir %{_datadir}/kamailio/xhttp_pi
+%{_datadir}/kamailio/xhttp_pi/*
+
+
+%files		xmlops
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xmlops
+%{_libdir}/kamailio/modules/xmlops.so
+
+
+%files		xmlrpc
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xmlrpc
+%{_libdir}/kamailio/modules/xmlrpc.so
+%doc %{_docdir}/kamailio/modules/README.mi_xmlrpc
+%{_libdir}/kamailio/modules/mi_xmlrpc.so
+
+
+%files		xmpp
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xmpp
+%{_libdir}/kamailio/modules/xmpp.so
+
+
+
+%changelog
+* Mon Oct 7 2013 Peter Dunkley <peter.dunkley at crocodilertc.net>
+  - Consolidating changelog for 4.1.0 into a single entry...
+  - Added new modules to main package:
+    - cnxcc
+    - gzcompress
+    - mohqueue
+    - rtpproxy-ng
+    - sipt
+    - stun (STUN functionality moved from compile time in core to own module)
+  - Added new modules to other packages:
+    - ims_charging module to ims package
+  - Added new packages for new modules:
+    - app_java
+    - auth_ephemeral
+    - sctp (SCTP functionality moved from compile time in core to own module)
+  - Moved existing modules to different packages:
+    - auth_identity to tls package (previously not built for CentOS)
+    - cdp and cdp_avp to ims package
+    - dialog_ng to main package
+    - memcached to own package (previously not built for CentOS)
+    - mi_xmlrpc to own package (previously not built for CentOS)
+    - tls to own package
+  - Added packages for (new and existing) modules that require EPEL:
+    - carrierroute in own package
+    - dnssec in own package
+    - geoip in own package
+    - json and jsonrpc-c in new json package
+    - redis in own package
+    - acc_radius, auth_radius, misc_radius, and peering in new radius package
+  - Removed Fedora stuff as I am only maintaining this for CentOS now
+  - Refactored .spec
+  - Updated make commands to match updated module groups
+  - Updated version to 4.1.0
+* Mon Mar 11 2013 Peter Dunkley <peter.dunkley at crocodilertc.net>
+  - Consolidating changelog for 4.0.0 into a single entry...
+  - Added new modules to main package:
+    - corex
+    - sca
+  - Added new packages for new modules:
+    - cdp (cdp, cdp_avp)
+    - ims (dialog_ng, ims_auth, ims_icscf, ims_isc, ims_qos,
+      ims_registrar_pcscf, ims_registrar_scscf, ims_usrloc_pcscf,
+      ims_usrloc_scscf)
+    - outbound
+    - websocket
+    - xhttp_pi
+  - Moved existing modules to different packages:
+    - Various SER modules added to main package (avp, db2_ops, mangler, timer,
+      uid_auth_db, uid_avp_db, uid_domain, uid_gflags, uid_uri_db, print,
+      print_lib, xprint)
+    - db2_ldap SER module added to ldap package
+    - tls to main package (as OpenSSL was needed in core for STUN)
+  - Moved modules from modules_k/ to modules/
+  - Renamed perl modules
+  - Added installation of auth.7.gz for Fedora now that manpages are built for
+    Fedora
+  - SCTP and STUN now included in this build
+  - Refactored .spec
+  - Updated ver to 4.0.0
+* Mon Jun 18 2012 Peter Dunkley <peter.dunkley at crocodilertc.net>
+  - Consolidating changelog for 3.3.0 into a single entry...
+  - See revision control for details this far back
diff --git a/pkg/kamailio/centos/6/kamailio.sysconfig b/pkg/kamailio/centos/6/kamailio.sysconfig
new file mode 100644
index 0000000..1a7316f
--- /dev/null
+++ b/pkg/kamailio/centos/6/kamailio.sysconfig
@@ -0,0 +1,30 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+RUN_KAMAILIO=yes
+
+# User to run as
+USER=kamailio
+
+# Group to run as
+GROUP=kamailio
+
+# Amount of shared memory to allocate for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+
+# Amount of per-process (package) memory to allocate for Kamailio (in Mb)
+PKG_MEMORY=4
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify
+# a directory for the core files to get a dump. Look into the kamailio
+# init file for an example configuration.
+DUMP_CORE=no
+
+# Add extra command line parameters in the EXTRA_OPTIONS variable
+# EXTRA_OPTIONS="-a no"
diff --git a/pkg/kamailio/deb/debian/backports/jessie b/pkg/kamailio/deb/debian/backports/jessie
new file mode 100755
index 0000000..80cd6a6
--- /dev/null
+++ b/pkg/kamailio/deb/debian/backports/jessie
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Hook for automatic backports at buildserver.net
+#
+# Target dist: Debian Jessie
+DIST=jessie
+
+rm -rf ${DIST}
+cp -r debian ${DIST}
+
+# No mi_xmlrpc module
+sed -i -e '/libxmlrpc-c3-dev/d' -e '/^Package: kamailio-xmlrpc-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ mi_xmlrpc[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mi_xmlrpc/' ${DIST}/rules
+
+# clean backports scripts
+rm -rf ${DIST}/backports
+exit 0
diff --git a/pkg/kamailio/deb/debian/backports/precise b/pkg/kamailio/deb/debian/backports/precise
new file mode 100755
index 0000000..6cf914a
--- /dev/null
+++ b/pkg/kamailio/deb/debian/backports/precise
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Hook for automatic backports at buildserver.net
+#
+# Target dist: Debian Squeeze
+DIST=precise
+
+rm -rf ${DIST}
+cp -r debian ${DIST}
+
+# No mi_xmlrpc module
+sed -i -e '/libxmlrpc-c3-dev/d' -e '/^Package: kamailio-xmlrpc-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ mi_xmlrpc[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mi_xmlrpc/' ${DIST}/rules
+
+# No dnssec module:
+sed -i -e '/libval-dev/d' -e '/^Package: kamailio-dnssec-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ dnssec[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ dnssec/' ${DIST}/rules
+
+# use old radius-client-ng
+sed -i 's/libfreeradius-client-dev/libradiusclient-ng-dev/' ${DIST}/control
+sed -i -e '/FREERADIUS/d' ${DIST}/rules
+
+# use old json
+sed -i 's/libjson-c-dev/libjson0-dev/' ${DIST}/control
+
+# clean backports scripts
+rm -rf ${DIST}/backports
+exit 0
diff --git a/pkg/kamailio/deb/debian/backports/squeeze b/pkg/kamailio/deb/debian/backports/squeeze
new file mode 100755
index 0000000..b037d57
--- /dev/null
+++ b/pkg/kamailio/deb/debian/backports/squeeze
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# Hook for automatic backports at buildserver.net
+#
+# Target dist: Debian Squeeze
+DIST=squeeze
+
+rm -rf ${DIST}
+cp -r debian ${DIST}
+
+# remove Multi-arch
+sed -i -e 's#^DEB_HOST_MULTIARCH.*$##' -e 's#^LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)#LIBDIR ?= lib#' ${DIST}/rules
+if [ -e ${DIST}/patches/series ]; then
+  sed -i -e 's#multiarch_support.patch#no_lib64_on_64_bits.patch#' ${DIST}/patches/series
+fi
+sed -i -e '/^Multi-Arch: .*/d' ${DIST}/control
+
+# Downgrade to debhelper 8 compat
+sed -i -e  's#debhelper[^,$]*[\ ,$]\+\(.*\)$#debhelper (>= 8), \1#' ${DIST}/control
+echo 8 > ${DIST}/compat
+
+# Hardening flags
+sed -i -e '/dpkg-dev/d' ${DIST}/control
+sed -i -e '/^include.*buildflags.mk/d' -e '/.*dpkg-buildflags --export=configure.*/d' ${DIST}/rules
+if [ -e ${DIST}/patches/series ]; then
+  sed -i -e '/hardening_flags.patch/d' ${DIST}/patches/series
+fi
+
+# No java module:
+sed -i -e '/libgcj12-dev/d' -e '/^Package: kamailio-java-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ java[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ java/' ${DIST}/rules
+
+# No dnssec module:
+sed -i -e '/libval-dev/d' -e '/^Package: kamailio-dnssec-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ dnssec[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ dnssec/' ${DIST}/rules
+
+# No sctp module:
+sed -i -e '/libsctp-dev/d' -e '/^Package: kamailio-sctp-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ sctp[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ sctp/' ${DIST}/rules
+
+# No purple module:
+sed -i -e '/libpurple-dev/d' -e '/^Package: kamailio-purple-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ purple[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ purple/' ${DIST}/rules
+
+# No libhiredis:
+sed -i -e '/libhiredis-dev/d' -e '/^Package: kamailio-redis-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ redis[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ redis/' ${DIST}/rules
+
+# No mono module
+sed -i -e '/libmono-2.0-dev/d' -e '/^Package: kamailio-mono-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ mono[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mono/' ${DIST}/rules
+
+# db-util version
+sed -i -e 's/db-util/db4.8-util/' ${DIST}/control
+
+# use old radius-client-ng
+sed -i 's/libfreeradius-client-dev/libradiusclient-ng-dev/' ${DIST}/control
+sed -i -e '/FREERADIUS/d' ${DIST}/rules
+
+# use old json
+sed -i 's/libjson-c-dev/libjson0-dev/' ${DIST}/control
+
+# clean backports scripts
+rm -rf ${DIST}/backports
+exit 0
diff --git a/pkg/kamailio/deb/debian/backports/wheezy b/pkg/kamailio/deb/debian/backports/wheezy
new file mode 100755
index 0000000..ccd1b9d
--- /dev/null
+++ b/pkg/kamailio/deb/debian/backports/wheezy
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Hook for automatic backports at buildserver.net
+#
+# Target dist: Debian Wheezy
+DIST=wheezy
+
+rm -rf ${DIST}
+cp -r debian ${DIST}
+
+# No purple module:
+sed -i -e '/libpurple-dev/d' -e '/^Package: kamailio-purple-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ purple[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ purple/' ${DIST}/rules
+
+# No mi_xmlrpc module
+sed -i -e '/libxmlrpc-c3-dev/d' -e '/^Package: kamailio-xmlrpc-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ mi_xmlrpc[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mi_xmlrpc/' ${DIST}/rules
+
+# No dnssec module:
+sed -i -e '/libval-dev/d' -e '/^Package: kamailio-dnssec-modules/,/^$/d' \
+	${DIST}/control
+sed -i -e 's/ dnssec[ ,$]*/ /' ${DIST}/rules
+sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ dnssec/' ${DIST}/rules
+
+# use old radius-client-ng
+sed -i 's/libfreeradius-client-dev/libradiusclient-ng-dev/' ${DIST}/control
+sed -i -e '/FREERADIUS/d' ${DIST}/rules
+
+# use old json
+sed -i 's/libjson-c-dev/libjson0-dev/' ${DIST}/control
+
+# clean backports scripts
+rm -rf ${DIST}/backports
+exit 0
diff --git a/pkg/kamailio/deb/debian/changelog b/pkg/kamailio/deb/debian/changelog
new file mode 100644
index 0000000..f470e3d
--- /dev/null
+++ b/pkg/kamailio/deb/debian/changelog
@@ -0,0 +1,112 @@
+kamailio (4.1.4) unstable; urgency=low
+
+  * update to 4.1.4 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 12 Jun 2014 15:55:55 +0100
+
+kamailio (4.1.3) unstable; urgency=low
+
+  * update to 4.1.3 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 24 Apr 2014 10:45:20 +0100
+
+kamailio (4.1.2) unstable; urgency=low
+
+  * update to 4.1.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 06 Mar 2014 15:25:35 +0100
+
+kamailio (4.1.1) unstable; urgency=low
+
+  * update to 4.1.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 09 Jan 2014 15:45:35 +0100
+
+kamailio (4.1.0) unstable; urgency=low
+
+  * update to 4.1.0
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 04 Dec 2013 11:42:27 +0100
+
+kamailio (4.0.0) unstable; urgency=low
+
+  * update to 4.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Mar 2013 10:40:30 +0100
+
+kamailio (3.4.0~dev0) unstable; urgency=low
+
+  * update version to 3.4.0~dev0
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 15 Jun 2012 03:15:00 +0100
+
+kamailio (3.2.0) unstable; urgency=low
+
+  * update to 3.2.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 29 Apr 2011 12:25:30 +0100
+
+kamailio (3.1.1) unstable; urgency=low
+
+  * update to 3.1.1 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 3 Dec 2010 16:30:00 +0100
+
+kamailio (3.1.0) unstable; urgency=low
+
+  * update to 3.1.0 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 6 Oct 2010 17:24:00 +0100
+
+kamailio (3.0.2.99) unstable; urgency=low
+
+  * update to 3.0.2.99 for development version builds
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 28 May 2010 22:26:00 +0100
+
+kamailio (3.0.2) unstable; urgency=low
+
+  * update to 3.0.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 27 May 2010 10:27:36 +0100
+
+kamailio (3.0.1) unstable; urgency=low
+
+  * update to 3.0.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 08 Mar 2010 20:30:48 +0100
+
+kamailio (3.0.0) unstable; urgency=low
+
+  * update to 3.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Jan 2010 18:30:42 +0100
+
+kamailio (3.0.0-rc3) unstable; urgency=low
+
+  * update to 3.0.0-rc3 from upstream
+  * updated debian/rules to work with the SIP Router style module packaging
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 10 Dec 2009 12:10:02 +0100
+
+kamailio (3.0.0-rc2) unstable; urgency=low
+
+  * update to 3.0.0-rc2 from upstream
+  * updated debian/rules to work with the new style module packaging
+
+ -- Jonas Bergler <jonas.bergler at staff.snap.net.nz>  Wed, 18 Nov 2009 12:30:02 +1300
+
+kamailio (1.5.0-svn1) unstable; urgency=low
+
+  * increment debian packaging for trunk
+
+ -- Henning Westerholt <henning.westerholt at 1und1.de>  Mon, 02 Mar 2009 17:40:02 +0100
+
+kamailio (1.4.0-svn1) unstable; urgency=low
+
+  [ Klaus Darilion ]
+  * first release of Kamailio (after renaming from Openser)
+
+ -- Julien BLACHE <jblache at debian.org>  Wed, 12 Dec 2007 17:25:31 +0100
+
+
diff --git a/pkg/kamailio/deb/debian/compat b/pkg/kamailio/deb/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/pkg/kamailio/deb/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/pkg/kamailio/deb/debian/control b/pkg/kamailio/deb/debian/control
new file mode 100644
index 0000000..895c615
--- /dev/null
+++ b/pkg/kamailio/deb/debian/control
@@ -0,0 +1,570 @@
+Source: kamailio
+Section: net
+Priority: optional
+Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
+Uploaders: Victor Seva <linuxmaniac at torreviejawireless.org>,
+           Tzafrir Cohen <tzafrir at debian.org>
+Build-Depends: bison,
+               debhelper (>= 9),
+               docbook-xml,
+               dpkg-dev (>= 1.16.1.1),
+               flex,
+               libconfuse-dev,
+               libcurl4-openssl-dev,
+               libdb-dev (>= 4.6.19),
+               libevent-dev,
+               libexpat1-dev,
+               libfreeradius-client-dev,
+               libgcj12-dev,
+               libgeoip-dev (>= 1.4.5),
+               libhiredis-dev (>= 0.10.0),
+               libjson-c-dev,
+               libldap2-dev,
+               liblua5.1-0-dev,
+               libmemcached-dev,
+               libmono-2.0-dev,
+               libmysqlclient-dev,
+               libncurses5-dev,
+               libpcre3-dev,
+               libperl-dev,
+               libpq-dev,
+               libpurple-dev,
+               libreadline-dev,
+               libsasl2-dev,
+               libsctp-dev,
+               libsnmp-dev,
+               libsqlite3-dev,
+               libunistring-dev,
+               libval-dev,
+               libxml2-dev,
+               libxmlrpc-c3-dev,
+               openssl,
+               python,
+               python-dev,
+               unixodbc-dev,
+               xsltproc,
+               zlib1g-dev
+Standards-Version: 3.9.5
+Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
+
+Package: kamailio
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
+Suggests: kamailio-berkeley-modules,
+          kamailio-carrierroute-modules,
+          kamailio-cpl-modules,
+          kamailio-dbg,
+          kamailio-ldap-modules,
+          kamailio-lua-modules,
+          kamailio-mysql-modules,
+          kamailio-perl-modules,
+          kamailio-postgres-modules,
+          kamailio-presence-modules,
+          kamailio-python-modules,
+          kamailio-radius-modules,
+          kamailio-snmpstats-modules,
+          kamailio-tls-modules,
+          kamailio-unixodbc-modules,
+          kamailio-xml-modules,
+          kamailio-xmpp-modules
+Description: very fast and configurable SIP proxy
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ C Shell-like scripting language provides full control over the server's
+ behaviour. Its modular architecture allows only required functionality to be
+ loaded.
+ .
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
+ .
+ This package contains the main Kamailio binary along with the principal modules
+ and support binaries.
+
+Package: kamailio-dbg
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}
+Description: very fast and configurable SIP proxy [debug symbols]
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the geoip module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Json parser and jsonrpc modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_lua module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_mono module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         python-dev,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_python module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Redis database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Redis NOSQL database driver for Kamailio.
+
+Package: kamailio-mysql-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         mysql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: MySQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the MySQL database driver for Kamailio.
+
+Package: kamailio-postgres-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         postgresql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: PostgreSQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the PostgreSQL database driver for Kamailio.
+
+Package: kamailio-cpl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: CPL module (CPL interpreter engine) for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a CPL (Call Processing Language) interpreter for
+ Kamailio, turning Kamailio into a CPL server (storage and interpreter).
+
+Package: kamailio-radius-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: RADIUS modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
+
+Package: kamailio-unixodbc-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: unixODBC database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the unixODBC database driver for Kamailio.
+
+Package: kamailio-presence-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: SIMPLE presence modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides several Kamailio modules for implementing presence
+ server and presence user agent for RICH presence, registrar-based presence,
+ external triggered presence and XCAP support.
+
+Package: kamailio-perl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Perl extensions and database driver for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides an interface for Kamailio to write Perl extensions and
+ the perlvdb database driver for Kamailio.
+
+Package: kamailio-snmpstats-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         snmpd,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: SNMP AgentX subagent module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the snmpstats module for Kamailio. This module acts
+ as an AgentX subagent which connects to a master agent.
+
+Package: kamailio-purple-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides the purple module, a multi-protocol IM gateway
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the purple module, a multi-protocol instant
+ messaging gateway module.
+
+Package: kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: XMPP gateway module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SIP to XMPP IM translator module for Kamailio.
+
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
+Package: kamailio-carrierroute-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: carrierroute module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the carrierroute module for Kamailio, an integrated
+ solution for routing, balancing and blacklisting.
+
+Package: kamailio-berkeley-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: db5.1-util,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: Berkeley database module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Berkeley database module for Kamailio, a
+ high-performance embedded DB kernel. All database tables are stored
+ in files, no additional server is necessary.
+
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
+Package: kamailio-ldap-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: LDAP modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ldap and h350 modules for Kamailio, enabling LDAP
+ queries from the Kamailio config and storage of SIP account data in an LDAP
+ directory.
+
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: IMS module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
+Package: kamailio-utils-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides a set utility functions for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ Provides a set of utility functions for Kamailio, which are not related
+ to the server configuration.
+
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: sctp module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the sctp module for Kamailio.
+
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: gcj-jre,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_java module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
+
+Package: kamailio-tls-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the TLS kamailio transport module
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
+
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Outbound module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing SIP outbound extension.
+
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Websocket module for kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing WebSocket transport layer.
+
+Package: kamailio-dnssec-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the dnssec module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the dnssec module for Kamailio.
+
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: authentication using ephemeral credentials module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ephemeral module for Kamailio.
+
+Package: kamailio-extra-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: extra modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides: gzcompress
+
+Package: kamailio-nth
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: binutils,
+         bison,
+         bvi,
+         flex,
+         gcc,
+         gdb,
+         iftop,
+         lsof,
+         mc,
+         most,
+         ngrep,
+         psmisc,
+         screen,
+         sipsak,
+         tcpdump,
+         vim,
+         ${misc:Depends}
+Description: Kamailio - package for "nice to have" installation
+ This is a metapackage for easy installation various useful tools that may be
+ handy on server with Kamailio installed.
diff --git a/pkg/kamailio/deb/debian/copyright b/pkg/kamailio/deb/debian/copyright
new file mode 100644
index 0000000..ff31338
--- /dev/null
+++ b/pkg/kamailio/deb/debian/copyright
@@ -0,0 +1,335 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Kamailio
+Upstream-Contact: sr-dev at lists.sip-router.org
+Source: http://www.kamailio.org/pub/kamailio/
+
+Files: *
+Copyright:
+ 2001-2003 FhG Fokus
+ 2006-2010 iptelorg GmbH
+ Various others (see AUTHORS file)
+License: GPL-2.0+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2012, 2013, 2014 Victor Seva <linuxmaniac at torreviejawireless.org>
+           2009, 2010, 2011, Daniel-Constantin Mierla <miconda at gmail.com>
+           2010, Jon Bonilla <manwe at aholab.ehu.es>
+           2009, Jonas Bergler <jonas.bergler at staff.snap.net.nz>
+           2009, Henning Westerholt <henning.westerholt at 1und1.de>
+           2007, Julien BLACHE <jblache at debian.org>
+License: GPL-2+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+Files: atomic/* atomic_ops.* basex.* bit_*.c char_msg_val.h compiler_opt.h
+ core_stats.h counters.* endianness.* futexlock.h hashes.h io_wait.*
+ kstats_types.h lib/kcore/kstats_wrapper.* lock_ops.c lock_ops_init.h
+ lvalue.* mem/ll_malloc.* mem/memdbg.h mem/sf_malloc.* mi/*.h mod_fix.*
+ modules/tm/rpc_uac.* modules/counters/counters.c modules/tls/sbufq.h
+ modules/tls/tls_bio.* modules/tls/tls_cfg.* modules/tls/tls_cfg.h
+ modules/tls/tls_ct_wrq.* modules/tls/tls_ct_q.h modules/tls/tls_domain.*
+ modules/tls/tls_server.h modules/tls/tls_locking.* modules/tls/tls_rpc.*
+ modules/tls/tls_server.c modules/malloc_test/malloc_test.c modules/blst/blst.c
+ parser/case_p_* parser/case_reas.h pvapi.h pv_core.* rand/fastrand.* raw_*
+ rpc_lookup.* rvalue.* sctp_* ser_time.h shm_init.* sip_msg_clone.* sock_ut.*
+ sr_compat.* str_hash.h switch.* tcp_ev.h tcp_int_send.h tcp_options.*
+ tcp_read.h tcp_stats.* timer_proc.* tls_hooks.* tls_hooks_init.h ver.*
+Copyright: 2006-2010 iptelorg GmbH
+License: ISC
+
+Files: modules/tls/tls_select.* modules/tls/tls_dump_vf.*
+Copyright: 2005-2010 iptelorg GmbH
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: modules/websocket/* modules/outbound/* modules/auth_ephemeral/*
+Copyright: 2012-2013 Crocodile RCS Ltd
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: daemonize.* fastlock.h lock_ops.h mem/mem.* mem/f_malloc.h
+ mem/meminfo.h mem/memtest.c mem/shm_mem.c mem/q_malloc.h mem/q_malloc.c
+ mem/shm_mem.h mem/f_malloc.c modules/tls/tls_rpc.c modules/tls/tls_server.c
+ modules/tls/tls_domain.c modules/tls/tls_domain.h modules/tls/tls_server.h
+ modules/tls/tls_rpc.h pt.c pt.h sched_yield.h ut.c ut.h
+Copyright: 2001-2003 FhG Fokus
+License: ISC
+
+Files: events.* modules/topoh/*
+Copyright: 2009 SIP-Router.org
+License: ISC
+
+Files: modules/mi_rpc/mi_rpc_mod.c modules/pv/pv_xavp.*
+ modules/usrloc/ul_rpc.* ppcfg.* xavp.*
+Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com)
+License: ISC
+
+Files: obsolete/jabber_k/tree234.*
+Copyright: 1999, 2000, 2001, Simon Tatham
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: modules/xmpp/xsnprintf.c obsolete/jabber_s/xsnprintf.c obsolete/jabber_k/xsnprintf.c
+Copyright: 1995-1998, The Apache Group
+License: Apache-1.0
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ 4. The names "Apache Server" and "Apache Group" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission.
+ .
+ 5. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: modules/mi_xmlrpc/abyss*
+Copyright: 2000, Moez Mahfoudh <mmoez at bigfoot.com>
+License: BSD-3-clause
+
+Files: list.h
+Copyright: 1991, 1993 The Regents of the University of California
+License: BSD-3-clause
+
+Files: modules/tm/t_serial.*
+Copyright: 2008 Juha Heinanen
+License: BSD-2-clause
+
+Files: parser/sdp/sdp.* parser/sdp/sdp_helpr_funcs.* parser/sdp/sdp_cloner.h
+Copyright:
+ 2008-2009 SOMA Networks, INC.
+ 2010 VoIP Embedded, Inc
+License: BSD-2-clause
+
+Files: modules/tls/fixed_c_zlib.h
+Copyright:1998-2005 The OpenSSL Project
+Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that
+ this code will not build by default in the Debian packaging.
+License: OpenSSL
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ .
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    openssl-core at openssl.org.
+ .
+ 5. Products derived from this software may not be called "OpenSSL"
+    nor may "OpenSSL" appear in their names without prior written
+    permission of the OpenSSL Project.
+ .
+ 6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ .
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: md5.* md5utils.c
+Copyright: 1991-2, RSA Data Security, Inc
+Comment: Note that md5.c and md5.h have been replaced in the patches
+ plum_md5*.patch .
+ .
+ As for md5utils.c, according to a mail from Upstream (Daniel-Constantin
+ Mierla): while the initial commit log for it states that it is derived
+ from mddriver.c of RFC 1321, it seems that it was, in fact, written from
+ scratch by Jiri Kuthan (a core developer of SER at that time, working for
+ FhG Fokus Institute). As you can see it's rather trivial and uses a data
+ type of SER ("str").  I didn't reimplement it as it's too trivial and
+ looks like there's no other way to implement it.
+License: RSA-MD5
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+ .
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+ .
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+ .
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+
+Files: mem/dl_*
+Copyright: n/a
+License: public-domain
+ This is a version (aka dlmalloc) of malloc/free/realloc written by
+ Doug Lea and released to the public domain, as explained at
+ http://creativecommons.org/licenses/publicdomain.  Send questions,
+ comments, complaints, performance data, etc to dl at cs.oswego.edu
+
+Files: rand/isaac/*
+Copyright: n/a
+License: public-domain
+ By Bob Jenkins.  My random number generator, ISAAC.  Public Domain.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files: lib/srutils/srjson.*
+Copyright: 2009 Dave Gamble
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ ,
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+  1. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/kamailio/deb/debian/kamailio-autheph-modules.lintian-overrides b/pkg/kamailio/deb/debian/kamailio-autheph-modules.lintian-overrides
new file mode 100644
index 0000000..dcb3d18
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio-autheph-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/debian/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/debian/kamailio-berkeley-bin.dirs
new file mode 100644
index 0000000..236670a
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio-berkeley-bin.dirs
@@ -0,0 +1 @@
+usr/sbin
diff --git a/pkg/kamailio/deb/debian/kamailio-dnssec-modules.lintian-overrides b/pkg/kamailio/deb/debian/kamailio-dnssec-modules.lintian-overrides
new file mode 100644
index 0000000..10165fe
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio-dnssec-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/debian/kamailio-outbound-modules.lintian-overrides b/pkg/kamailio/deb/debian/kamailio-outbound-modules.lintian-overrides
new file mode 100644
index 0000000..3050cfe
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio-outbound-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/debian/kamailio-tls-modules.lintian-overrides b/pkg/kamailio/deb/debian/kamailio-tls-modules.lintian-overrides
new file mode 100644
index 0000000..bbe0d37
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio-tls-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-tls-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/debian/kamailio-websocket-modules.lintian-overrides b/pkg/kamailio/deb/debian/kamailio-websocket-modules.lintian-overrides
new file mode 100644
index 0000000..8f384fb
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio-websocket-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/debian/kamailio.README.Debian b/pkg/kamailio/deb/debian/kamailio.README.Debian
new file mode 100644
index 0000000..d25769a
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio.README.Debian
@@ -0,0 +1,39 @@
+Kamailio for Debian
+-------------------
+
+* init script check for fork=no
+-------------------------------
+
+The Kamailio init script will not start Kamailio on boot if fork=no is
+specified in the config file. The check in the initscript will match
+any occurrence of fork=no in the file, even inside C-style comments.
+
+You can disable this check in the init script if you wish; just comment
+out the calls to the check_fork function in the script. Your changes to
+the init script will be preserved upon upgrade, as the file is tagged
+as a conffile.
+
+
+* Kamailio setup
+----------------
+
+To setup Kamailio, you need to:
+ - configure Kamailio properly to suit your needs
+ - edit /etc/default/kamailio, adjust the MEMORY parameter and set
+   RUN_KAMAILIO to "yes"
+
+If you are building an HA cluster using heartbeat or similar, you'll want
+to disable the init script by running:
+
+  update-rc.d kamailio remove
+
+so that Kamailio will not be launched at system startup. You still need
+to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
+script.
+
+Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
+get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
+provided by the kamailio-dbg package.
+
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 11 Dec 2013 16:07:11 +0100
diff --git a/pkg/kamailio/deb/debian/kamailio.default b/pkg/kamailio/deb/debian/kamailio.default
new file mode 100644
index 0000000..0cfc8c8
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio.default
@@ -0,0 +1,28 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+#RUN_KAMAILIO=yes
+
+# User to run as
+#USER=kamailio
+
+# Group to run as
+#GROUP=kamailio
+
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+#SHM_MEMORY=64
+#PKG_MEMORY=4
+
+# Config file
+#CFGFILE=/etc/kamailio/kamailio.cfg
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable Kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes
diff --git a/pkg/kamailio/deb/debian/kamailio.examples b/pkg/kamailio/deb/debian/kamailio.examples
new file mode 100644
index 0000000..c48447a
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio.examples
@@ -0,0 +1,2 @@
+examples/*
+
diff --git a/pkg/kamailio/deb/debian/kamailio.init b/pkg/kamailio/deb/debian/kamailio.init
new file mode 100644
index 0000000..d4801d2
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio.init
@@ -0,0 +1,162 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          kamailio
+# Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
+# Required-Stop:     $syslog $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start the Kamailio SIP proxy server
+# Description:       Start the Kamailio SIP proxy server
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/kamailio
+NAME=kamailio
+DESC="Kamailio SIP server"
+HOMEDIR=/var/run/kamailio
+PIDFILE=$HOMEDIR/$NAME.pid
+DEFAULTS=/etc/default/kamailio
+CFGFILE=/etc/kamailio/kamailio.cfg
+RUN_KAMAILIO=no
+USER=kamailio
+GROUP=kamailio
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+PKG_MEMORY=4
+DUMP_CORE=no
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
+}
+
+check_kamailio_config ()
+{
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_failure_msg
+	    exit 1
+	fi
+}
+
+create_radius_seqfile ()
+{
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
+}
+
+test -f $DAEMON || exit 0
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+set -e
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
+fi
+
+OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
+
+case "$1" in
+  start|debug)
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
+  restart|force-reload)
+	check_kamailio_config
+	create_radius_seqfile
+
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+  status)
+	log_daemon_msg "Status of $DESC: "
+
+	status_of_proc -p"$PIDFILE" $NAME $NAME
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/pkg/kamailio/deb/debian/kamailio.lintian-overrides b/pkg/kamailio/deb/debian/kamailio.lintian-overrides
new file mode 100644
index 0000000..18152ed
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio.lintian-overrides
@@ -0,0 +1,2 @@
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge.cfg #!KAMAILIO
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/registrar.cfg #!KAMAILIO
diff --git a/pkg/kamailio/deb/debian/kamailio.postinst b/pkg/kamailio/deb/debian/kamailio.postinst
new file mode 100644
index 0000000..4ee38ec
--- /dev/null
+++ b/pkg/kamailio/deb/debian/kamailio.postinst
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        adduser --quiet --system --group --disabled-password \
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
+
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
diff --git a/pkg/kamailio/deb/debian/rules b/pkg/kamailio/deb/debian/rules
new file mode 100755
index 0000000..3b97b12
--- /dev/null
+++ b/pkg/kamailio/deb/debian/rules
@@ -0,0 +1,221 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# java stuff using libgcj12
+export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
+
+# choose freeradius
+export FREERADIUS=1
+
+# modules not in the "main" kamailio package
+EXCLUDED_MODULES=
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main kamailio package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy
+
+# module groups that are packaged in seperate packages
+# (with the name kamailio-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   purple tls outbound websocket autheph dnssec
+
+# module groups to be packaged onto kamailio-extra-modules
+EXTRA_GROUPS=gzcompress
+
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
+
+# "function" to get package short name out of a dir/module_name
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
+		$(MAKE) every-module group_include="k$(grp)"
+	)
+endef
+
+
+define PACKAGE_GRP_INSTALL_template
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		doc-dir=share/doc/kamailio-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
+	)
+endef
+
+define PACKAGE_EXTRA_INSTALL_template
+	$(foreach grp,$(EXTRA_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
+		doc-dir=share/doc/kamailio-extra-modules
+	)
+	# eliminate duplicate libs
+	-for d in $(DUP_LIBS_DIRS); do \
+		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
+		for r in `find $$d -name 'lib*'|xargs`; do \
+			echo "removing extra lib `basename $$r` present also in $$d";\
+			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+		done ; \
+	done
+	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
+			cfg_target=/etc/kamailio/ \
+			basedir=$(CURDIR)/debian/kamailio \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
+			group_include="kstandard"
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# Add here commands to clean up after the build process.
+	$(MAKE) maintainer-clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	# Add here commands to install the package into debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	$(call PACKAGE_EXTRA_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
+	# install /etc/default/kamailio file
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
+	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installinit -pkamailio -- defaults 23
+	dh_installcron
+	dh_installman
+	dh_installinfo
+	dh_lintian
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip --dbg-package=kamailio-dbg
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-independent packages using the common target
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+# We have nothing to do by default.
+
+
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
diff --git a/pkg/kamailio/deb/debian/source.lintian-overrides b/pkg/kamailio/deb/debian/source.lintian-overrides
new file mode 100644
index 0000000..620d9ff
--- /dev/null
+++ b/pkg/kamailio/deb/debian/source.lintian-overrides
@@ -0,0 +1 @@
+kamailio source: debian-watch-file-in-native-package
diff --git a/pkg/kamailio/deb/debian/source/format b/pkg/kamailio/deb/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/pkg/kamailio/deb/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/pkg/kamailio/deb/debian/watch b/pkg/kamailio/deb/debian/watch
new file mode 100644
index 0000000..c50f31f
--- /dev/null
+++ b/pkg/kamailio/deb/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz
diff --git a/pkg/kamailio/deb/jessie/changelog b/pkg/kamailio/deb/jessie/changelog
new file mode 100644
index 0000000..f470e3d
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/changelog
@@ -0,0 +1,112 @@
+kamailio (4.1.4) unstable; urgency=low
+
+  * update to 4.1.4 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 12 Jun 2014 15:55:55 +0100
+
+kamailio (4.1.3) unstable; urgency=low
+
+  * update to 4.1.3 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 24 Apr 2014 10:45:20 +0100
+
+kamailio (4.1.2) unstable; urgency=low
+
+  * update to 4.1.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 06 Mar 2014 15:25:35 +0100
+
+kamailio (4.1.1) unstable; urgency=low
+
+  * update to 4.1.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 09 Jan 2014 15:45:35 +0100
+
+kamailio (4.1.0) unstable; urgency=low
+
+  * update to 4.1.0
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 04 Dec 2013 11:42:27 +0100
+
+kamailio (4.0.0) unstable; urgency=low
+
+  * update to 4.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Mar 2013 10:40:30 +0100
+
+kamailio (3.4.0~dev0) unstable; urgency=low
+
+  * update version to 3.4.0~dev0
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 15 Jun 2012 03:15:00 +0100
+
+kamailio (3.2.0) unstable; urgency=low
+
+  * update to 3.2.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 29 Apr 2011 12:25:30 +0100
+
+kamailio (3.1.1) unstable; urgency=low
+
+  * update to 3.1.1 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 3 Dec 2010 16:30:00 +0100
+
+kamailio (3.1.0) unstable; urgency=low
+
+  * update to 3.1.0 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 6 Oct 2010 17:24:00 +0100
+
+kamailio (3.0.2.99) unstable; urgency=low
+
+  * update to 3.0.2.99 for development version builds
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 28 May 2010 22:26:00 +0100
+
+kamailio (3.0.2) unstable; urgency=low
+
+  * update to 3.0.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 27 May 2010 10:27:36 +0100
+
+kamailio (3.0.1) unstable; urgency=low
+
+  * update to 3.0.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 08 Mar 2010 20:30:48 +0100
+
+kamailio (3.0.0) unstable; urgency=low
+
+  * update to 3.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Jan 2010 18:30:42 +0100
+
+kamailio (3.0.0-rc3) unstable; urgency=low
+
+  * update to 3.0.0-rc3 from upstream
+  * updated debian/rules to work with the SIP Router style module packaging
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 10 Dec 2009 12:10:02 +0100
+
+kamailio (3.0.0-rc2) unstable; urgency=low
+
+  * update to 3.0.0-rc2 from upstream
+  * updated debian/rules to work with the new style module packaging
+
+ -- Jonas Bergler <jonas.bergler at staff.snap.net.nz>  Wed, 18 Nov 2009 12:30:02 +1300
+
+kamailio (1.5.0-svn1) unstable; urgency=low
+
+  * increment debian packaging for trunk
+
+ -- Henning Westerholt <henning.westerholt at 1und1.de>  Mon, 02 Mar 2009 17:40:02 +0100
+
+kamailio (1.4.0-svn1) unstable; urgency=low
+
+  [ Klaus Darilion ]
+  * first release of Kamailio (after renaming from Openser)
+
+ -- Julien BLACHE <jblache at debian.org>  Wed, 12 Dec 2007 17:25:31 +0100
+
+
diff --git a/pkg/kamailio/deb/jessie/compat b/pkg/kamailio/deb/jessie/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/compat
@@ -0,0 +1 @@
+9
diff --git a/pkg/kamailio/deb/jessie/control b/pkg/kamailio/deb/jessie/control
new file mode 100644
index 0000000..f5b1714
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/control
@@ -0,0 +1,569 @@
+Source: kamailio
+Section: net
+Priority: optional
+Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
+Uploaders: Victor Seva <linuxmaniac at torreviejawireless.org>,
+           Tzafrir Cohen <tzafrir at debian.org>
+Build-Depends: bison,
+               debhelper (>= 9),
+               docbook-xml,
+               dpkg-dev (>= 1.16.1.1),
+               flex,
+               libconfuse-dev,
+               libcurl4-openssl-dev,
+               libdb-dev (>= 4.6.19),
+               libevent-dev,
+               libexpat1-dev,
+               libfreeradius-client-dev,
+               libgcj12-dev,
+               libgeoip-dev (>= 1.4.5),
+               libhiredis-dev (>= 0.10.0),
+               libjson-c-dev,
+               libldap2-dev,
+               liblua5.1-0-dev,
+               libmemcached-dev,
+               libmono-2.0-dev,
+               libmysqlclient-dev,
+               libncurses5-dev,
+               libpcre3-dev,
+               libperl-dev,
+               libpq-dev,
+               libpurple-dev,
+               libreadline-dev,
+               libsasl2-dev,
+               libsctp-dev,
+               libsnmp-dev,
+               libsqlite3-dev,
+               libunistring-dev,
+               libval-dev,
+               libxml2-dev,
+               openssl,
+               python,
+               python-dev,
+               unixodbc-dev,
+               xsltproc,
+               zlib1g-dev
+Standards-Version: 3.9.5
+Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
+
+Package: kamailio
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
+Suggests: kamailio-berkeley-modules,
+          kamailio-carrierroute-modules,
+          kamailio-cpl-modules,
+          kamailio-dbg,
+          kamailio-ldap-modules,
+          kamailio-lua-modules,
+          kamailio-mysql-modules,
+          kamailio-perl-modules,
+          kamailio-postgres-modules,
+          kamailio-presence-modules,
+          kamailio-python-modules,
+          kamailio-radius-modules,
+          kamailio-snmpstats-modules,
+          kamailio-tls-modules,
+          kamailio-unixodbc-modules,
+          kamailio-xml-modules,
+          kamailio-xmpp-modules
+Description: very fast and configurable SIP proxy
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ C Shell-like scripting language provides full control over the server's
+ behaviour. Its modular architecture allows only required functionality to be
+ loaded.
+ .
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
+ .
+ This package contains the main Kamailio binary along with the principal modules
+ and support binaries.
+
+Package: kamailio-dbg
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}
+Description: very fast and configurable SIP proxy [debug symbols]
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the geoip module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Json parser and jsonrpc modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_lua module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_mono module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         python-dev,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_python module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Redis database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Redis NOSQL database driver for Kamailio.
+
+Package: kamailio-mysql-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         mysql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: MySQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the MySQL database driver for Kamailio.
+
+Package: kamailio-postgres-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         postgresql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: PostgreSQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the PostgreSQL database driver for Kamailio.
+
+Package: kamailio-cpl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: CPL module (CPL interpreter engine) for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a CPL (Call Processing Language) interpreter for
+ Kamailio, turning Kamailio into a CPL server (storage and interpreter).
+
+Package: kamailio-radius-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: RADIUS modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
+
+Package: kamailio-unixodbc-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: unixODBC database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the unixODBC database driver for Kamailio.
+
+Package: kamailio-presence-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: SIMPLE presence modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides several Kamailio modules for implementing presence
+ server and presence user agent for RICH presence, registrar-based presence,
+ external triggered presence and XCAP support.
+
+Package: kamailio-perl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Perl extensions and database driver for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides an interface for Kamailio to write Perl extensions and
+ the perlvdb database driver for Kamailio.
+
+Package: kamailio-snmpstats-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         snmpd,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: SNMP AgentX subagent module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the snmpstats module for Kamailio. This module acts
+ as an AgentX subagent which connects to a master agent.
+
+Package: kamailio-purple-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides the purple module, a multi-protocol IM gateway
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the purple module, a multi-protocol instant
+ messaging gateway module.
+
+Package: kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: XMPP gateway module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SIP to XMPP IM translator module for Kamailio.
+
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
+Package: kamailio-carrierroute-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: carrierroute module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the carrierroute module for Kamailio, an integrated
+ solution for routing, balancing and blacklisting.
+
+Package: kamailio-berkeley-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: db5.1-util,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: Berkeley database module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Berkeley database module for Kamailio, a
+ high-performance embedded DB kernel. All database tables are stored
+ in files, no additional server is necessary.
+
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
+Package: kamailio-ldap-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: LDAP modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ldap and h350 modules for Kamailio, enabling LDAP
+ queries from the Kamailio config and storage of SIP account data in an LDAP
+ directory.
+
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: IMS module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
+Package: kamailio-utils-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides a set utility functions for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ Provides a set of utility functions for Kamailio, which are not related
+ to the server configuration.
+
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: sctp module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the sctp module for Kamailio.
+
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: gcj-jre,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_java module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
+
+Package: kamailio-tls-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the TLS kamailio transport module
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
+
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Outbound module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing SIP outbound extension.
+
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Websocket module for kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing WebSocket transport layer.
+
+Package: kamailio-dnssec-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the dnssec module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the dnssec module for Kamailio.
+
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: authentication using ephemeral credentials module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ephemeral module for Kamailio.
+
+Package: kamailio-extra-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: extra modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides: gzcompress
+
+Package: kamailio-nth
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: binutils,
+         bison,
+         bvi,
+         flex,
+         gcc,
+         gdb,
+         iftop,
+         lsof,
+         mc,
+         most,
+         ngrep,
+         psmisc,
+         screen,
+         sipsak,
+         tcpdump,
+         vim,
+         ${misc:Depends}
+Description: Kamailio - package for "nice to have" installation
+ This is a metapackage for easy installation various useful tools that may be
+ handy on server with Kamailio installed.
diff --git a/pkg/kamailio/deb/jessie/copyright b/pkg/kamailio/deb/jessie/copyright
new file mode 100644
index 0000000..ff31338
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/copyright
@@ -0,0 +1,335 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Kamailio
+Upstream-Contact: sr-dev at lists.sip-router.org
+Source: http://www.kamailio.org/pub/kamailio/
+
+Files: *
+Copyright:
+ 2001-2003 FhG Fokus
+ 2006-2010 iptelorg GmbH
+ Various others (see AUTHORS file)
+License: GPL-2.0+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2012, 2013, 2014 Victor Seva <linuxmaniac at torreviejawireless.org>
+           2009, 2010, 2011, Daniel-Constantin Mierla <miconda at gmail.com>
+           2010, Jon Bonilla <manwe at aholab.ehu.es>
+           2009, Jonas Bergler <jonas.bergler at staff.snap.net.nz>
+           2009, Henning Westerholt <henning.westerholt at 1und1.de>
+           2007, Julien BLACHE <jblache at debian.org>
+License: GPL-2+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+Files: atomic/* atomic_ops.* basex.* bit_*.c char_msg_val.h compiler_opt.h
+ core_stats.h counters.* endianness.* futexlock.h hashes.h io_wait.*
+ kstats_types.h lib/kcore/kstats_wrapper.* lock_ops.c lock_ops_init.h
+ lvalue.* mem/ll_malloc.* mem/memdbg.h mem/sf_malloc.* mi/*.h mod_fix.*
+ modules/tm/rpc_uac.* modules/counters/counters.c modules/tls/sbufq.h
+ modules/tls/tls_bio.* modules/tls/tls_cfg.* modules/tls/tls_cfg.h
+ modules/tls/tls_ct_wrq.* modules/tls/tls_ct_q.h modules/tls/tls_domain.*
+ modules/tls/tls_server.h modules/tls/tls_locking.* modules/tls/tls_rpc.*
+ modules/tls/tls_server.c modules/malloc_test/malloc_test.c modules/blst/blst.c
+ parser/case_p_* parser/case_reas.h pvapi.h pv_core.* rand/fastrand.* raw_*
+ rpc_lookup.* rvalue.* sctp_* ser_time.h shm_init.* sip_msg_clone.* sock_ut.*
+ sr_compat.* str_hash.h switch.* tcp_ev.h tcp_int_send.h tcp_options.*
+ tcp_read.h tcp_stats.* timer_proc.* tls_hooks.* tls_hooks_init.h ver.*
+Copyright: 2006-2010 iptelorg GmbH
+License: ISC
+
+Files: modules/tls/tls_select.* modules/tls/tls_dump_vf.*
+Copyright: 2005-2010 iptelorg GmbH
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: modules/websocket/* modules/outbound/* modules/auth_ephemeral/*
+Copyright: 2012-2013 Crocodile RCS Ltd
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: daemonize.* fastlock.h lock_ops.h mem/mem.* mem/f_malloc.h
+ mem/meminfo.h mem/memtest.c mem/shm_mem.c mem/q_malloc.h mem/q_malloc.c
+ mem/shm_mem.h mem/f_malloc.c modules/tls/tls_rpc.c modules/tls/tls_server.c
+ modules/tls/tls_domain.c modules/tls/tls_domain.h modules/tls/tls_server.h
+ modules/tls/tls_rpc.h pt.c pt.h sched_yield.h ut.c ut.h
+Copyright: 2001-2003 FhG Fokus
+License: ISC
+
+Files: events.* modules/topoh/*
+Copyright: 2009 SIP-Router.org
+License: ISC
+
+Files: modules/mi_rpc/mi_rpc_mod.c modules/pv/pv_xavp.*
+ modules/usrloc/ul_rpc.* ppcfg.* xavp.*
+Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com)
+License: ISC
+
+Files: obsolete/jabber_k/tree234.*
+Copyright: 1999, 2000, 2001, Simon Tatham
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: modules/xmpp/xsnprintf.c obsolete/jabber_s/xsnprintf.c obsolete/jabber_k/xsnprintf.c
+Copyright: 1995-1998, The Apache Group
+License: Apache-1.0
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ 4. The names "Apache Server" and "Apache Group" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission.
+ .
+ 5. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: modules/mi_xmlrpc/abyss*
+Copyright: 2000, Moez Mahfoudh <mmoez at bigfoot.com>
+License: BSD-3-clause
+
+Files: list.h
+Copyright: 1991, 1993 The Regents of the University of California
+License: BSD-3-clause
+
+Files: modules/tm/t_serial.*
+Copyright: 2008 Juha Heinanen
+License: BSD-2-clause
+
+Files: parser/sdp/sdp.* parser/sdp/sdp_helpr_funcs.* parser/sdp/sdp_cloner.h
+Copyright:
+ 2008-2009 SOMA Networks, INC.
+ 2010 VoIP Embedded, Inc
+License: BSD-2-clause
+
+Files: modules/tls/fixed_c_zlib.h
+Copyright:1998-2005 The OpenSSL Project
+Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that
+ this code will not build by default in the Debian packaging.
+License: OpenSSL
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ .
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    openssl-core at openssl.org.
+ .
+ 5. Products derived from this software may not be called "OpenSSL"
+    nor may "OpenSSL" appear in their names without prior written
+    permission of the OpenSSL Project.
+ .
+ 6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ .
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: md5.* md5utils.c
+Copyright: 1991-2, RSA Data Security, Inc
+Comment: Note that md5.c and md5.h have been replaced in the patches
+ plum_md5*.patch .
+ .
+ As for md5utils.c, according to a mail from Upstream (Daniel-Constantin
+ Mierla): while the initial commit log for it states that it is derived
+ from mddriver.c of RFC 1321, it seems that it was, in fact, written from
+ scratch by Jiri Kuthan (a core developer of SER at that time, working for
+ FhG Fokus Institute). As you can see it's rather trivial and uses a data
+ type of SER ("str").  I didn't reimplement it as it's too trivial and
+ looks like there's no other way to implement it.
+License: RSA-MD5
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+ .
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+ .
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+ .
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+
+Files: mem/dl_*
+Copyright: n/a
+License: public-domain
+ This is a version (aka dlmalloc) of malloc/free/realloc written by
+ Doug Lea and released to the public domain, as explained at
+ http://creativecommons.org/licenses/publicdomain.  Send questions,
+ comments, complaints, performance data, etc to dl at cs.oswego.edu
+
+Files: rand/isaac/*
+Copyright: n/a
+License: public-domain
+ By Bob Jenkins.  My random number generator, ISAAC.  Public Domain.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files: lib/srutils/srjson.*
+Copyright: 2009 Dave Gamble
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ ,
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+  1. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/kamailio/deb/jessie/kamailio-autheph-modules.lintian-overrides b/pkg/kamailio/deb/jessie/kamailio-autheph-modules.lintian-overrides
new file mode 100644
index 0000000..dcb3d18
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio-autheph-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/jessie/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/jessie/kamailio-berkeley-bin.dirs
new file mode 100644
index 0000000..236670a
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio-berkeley-bin.dirs
@@ -0,0 +1 @@
+usr/sbin
diff --git a/pkg/kamailio/deb/jessie/kamailio-dnssec-modules.lintian-overrides b/pkg/kamailio/deb/jessie/kamailio-dnssec-modules.lintian-overrides
new file mode 100644
index 0000000..10165fe
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio-dnssec-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/jessie/kamailio-outbound-modules.lintian-overrides b/pkg/kamailio/deb/jessie/kamailio-outbound-modules.lintian-overrides
new file mode 100644
index 0000000..3050cfe
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio-outbound-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/jessie/kamailio-tls-modules.lintian-overrides b/pkg/kamailio/deb/jessie/kamailio-tls-modules.lintian-overrides
new file mode 100644
index 0000000..bbe0d37
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio-tls-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-tls-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/jessie/kamailio-websocket-modules.lintian-overrides b/pkg/kamailio/deb/jessie/kamailio-websocket-modules.lintian-overrides
new file mode 100644
index 0000000..8f384fb
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio-websocket-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/jessie/kamailio.README.Debian b/pkg/kamailio/deb/jessie/kamailio.README.Debian
new file mode 100644
index 0000000..d25769a
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio.README.Debian
@@ -0,0 +1,39 @@
+Kamailio for Debian
+-------------------
+
+* init script check for fork=no
+-------------------------------
+
+The Kamailio init script will not start Kamailio on boot if fork=no is
+specified in the config file. The check in the initscript will match
+any occurrence of fork=no in the file, even inside C-style comments.
+
+You can disable this check in the init script if you wish; just comment
+out the calls to the check_fork function in the script. Your changes to
+the init script will be preserved upon upgrade, as the file is tagged
+as a conffile.
+
+
+* Kamailio setup
+----------------
+
+To setup Kamailio, you need to:
+ - configure Kamailio properly to suit your needs
+ - edit /etc/default/kamailio, adjust the MEMORY parameter and set
+   RUN_KAMAILIO to "yes"
+
+If you are building an HA cluster using heartbeat or similar, you'll want
+to disable the init script by running:
+
+  update-rc.d kamailio remove
+
+so that Kamailio will not be launched at system startup. You still need
+to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
+script.
+
+Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
+get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
+provided by the kamailio-dbg package.
+
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 11 Dec 2013 16:07:11 +0100
diff --git a/pkg/kamailio/deb/jessie/kamailio.default b/pkg/kamailio/deb/jessie/kamailio.default
new file mode 100644
index 0000000..0cfc8c8
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio.default
@@ -0,0 +1,28 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+#RUN_KAMAILIO=yes
+
+# User to run as
+#USER=kamailio
+
+# Group to run as
+#GROUP=kamailio
+
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+#SHM_MEMORY=64
+#PKG_MEMORY=4
+
+# Config file
+#CFGFILE=/etc/kamailio/kamailio.cfg
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable Kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes
diff --git a/pkg/kamailio/deb/jessie/kamailio.examples b/pkg/kamailio/deb/jessie/kamailio.examples
new file mode 100644
index 0000000..c48447a
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio.examples
@@ -0,0 +1,2 @@
+examples/*
+
diff --git a/pkg/kamailio/deb/jessie/kamailio.init b/pkg/kamailio/deb/jessie/kamailio.init
new file mode 100644
index 0000000..d4801d2
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio.init
@@ -0,0 +1,162 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          kamailio
+# Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
+# Required-Stop:     $syslog $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start the Kamailio SIP proxy server
+# Description:       Start the Kamailio SIP proxy server
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/kamailio
+NAME=kamailio
+DESC="Kamailio SIP server"
+HOMEDIR=/var/run/kamailio
+PIDFILE=$HOMEDIR/$NAME.pid
+DEFAULTS=/etc/default/kamailio
+CFGFILE=/etc/kamailio/kamailio.cfg
+RUN_KAMAILIO=no
+USER=kamailio
+GROUP=kamailio
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+PKG_MEMORY=4
+DUMP_CORE=no
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
+}
+
+check_kamailio_config ()
+{
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_failure_msg
+	    exit 1
+	fi
+}
+
+create_radius_seqfile ()
+{
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
+}
+
+test -f $DAEMON || exit 0
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+set -e
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
+fi
+
+OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
+
+case "$1" in
+  start|debug)
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
+  restart|force-reload)
+	check_kamailio_config
+	create_radius_seqfile
+
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+  status)
+	log_daemon_msg "Status of $DESC: "
+
+	status_of_proc -p"$PIDFILE" $NAME $NAME
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/pkg/kamailio/deb/jessie/kamailio.lintian-overrides b/pkg/kamailio/deb/jessie/kamailio.lintian-overrides
new file mode 100644
index 0000000..18152ed
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio.lintian-overrides
@@ -0,0 +1,2 @@
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge.cfg #!KAMAILIO
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/registrar.cfg #!KAMAILIO
diff --git a/pkg/kamailio/deb/jessie/kamailio.postinst b/pkg/kamailio/deb/jessie/kamailio.postinst
new file mode 100644
index 0000000..4ee38ec
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/kamailio.postinst
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        adduser --quiet --system --group --disabled-password \
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
+
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
diff --git a/pkg/kamailio/deb/jessie/rules b/pkg/kamailio/deb/jessie/rules
new file mode 100755
index 0000000..fe254bd
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/rules
@@ -0,0 +1,221 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# java stuff using libgcj12
+export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
+
+# choose freeradius
+export FREERADIUS=1
+
+# modules not in the "main" kamailio package
+EXCLUDED_MODULES=
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main kamailio package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc
+
+# module groups that are packaged in seperate packages
+# (with the name kamailio-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   purple tls outbound websocket autheph dnssec
+
+# module groups to be packaged onto kamailio-extra-modules
+EXTRA_GROUPS=gzcompress
+
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
+
+# "function" to get package short name out of a dir/module_name
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
+		$(MAKE) every-module group_include="k$(grp)"
+	)
+endef
+
+
+define PACKAGE_GRP_INSTALL_template
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		doc-dir=share/doc/kamailio-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
+	)
+endef
+
+define PACKAGE_EXTRA_INSTALL_template
+	$(foreach grp,$(EXTRA_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
+		doc-dir=share/doc/kamailio-extra-modules
+	)
+	# eliminate duplicate libs
+	-for d in $(DUP_LIBS_DIRS); do \
+		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
+		for r in `find $$d -name 'lib*'|xargs`; do \
+			echo "removing extra lib `basename $$r` present also in $$d";\
+			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+		done ; \
+	done
+	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
+			cfg_target=/etc/kamailio/ \
+			basedir=$(CURDIR)/debian/kamailio \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
+			group_include="kstandard"
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# Add here commands to clean up after the build process.
+	$(MAKE) maintainer-clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	# Add here commands to install the package into debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	$(call PACKAGE_EXTRA_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
+	# install /etc/default/kamailio file
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
+	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installinit -pkamailio -- defaults 23
+	dh_installcron
+	dh_installman
+	dh_installinfo
+	dh_lintian
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip --dbg-package=kamailio-dbg
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-independent packages using the common target
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+# We have nothing to do by default.
+
+
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
diff --git a/pkg/kamailio/deb/jessie/source.lintian-overrides b/pkg/kamailio/deb/jessie/source.lintian-overrides
new file mode 100644
index 0000000..620d9ff
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/source.lintian-overrides
@@ -0,0 +1 @@
+kamailio source: debian-watch-file-in-native-package
diff --git a/pkg/kamailio/deb/jessie/source/format b/pkg/kamailio/deb/jessie/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/pkg/kamailio/deb/jessie/watch b/pkg/kamailio/deb/jessie/watch
new file mode 100644
index 0000000..c50f31f
--- /dev/null
+++ b/pkg/kamailio/deb/jessie/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz
diff --git a/pkg/kamailio/deb/precise/changelog b/pkg/kamailio/deb/precise/changelog
new file mode 100644
index 0000000..f470e3d
--- /dev/null
+++ b/pkg/kamailio/deb/precise/changelog
@@ -0,0 +1,112 @@
+kamailio (4.1.4) unstable; urgency=low
+
+  * update to 4.1.4 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 12 Jun 2014 15:55:55 +0100
+
+kamailio (4.1.3) unstable; urgency=low
+
+  * update to 4.1.3 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 24 Apr 2014 10:45:20 +0100
+
+kamailio (4.1.2) unstable; urgency=low
+
+  * update to 4.1.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 06 Mar 2014 15:25:35 +0100
+
+kamailio (4.1.1) unstable; urgency=low
+
+  * update to 4.1.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 09 Jan 2014 15:45:35 +0100
+
+kamailio (4.1.0) unstable; urgency=low
+
+  * update to 4.1.0
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 04 Dec 2013 11:42:27 +0100
+
+kamailio (4.0.0) unstable; urgency=low
+
+  * update to 4.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Mar 2013 10:40:30 +0100
+
+kamailio (3.4.0~dev0) unstable; urgency=low
+
+  * update version to 3.4.0~dev0
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 15 Jun 2012 03:15:00 +0100
+
+kamailio (3.2.0) unstable; urgency=low
+
+  * update to 3.2.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 29 Apr 2011 12:25:30 +0100
+
+kamailio (3.1.1) unstable; urgency=low
+
+  * update to 3.1.1 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 3 Dec 2010 16:30:00 +0100
+
+kamailio (3.1.0) unstable; urgency=low
+
+  * update to 3.1.0 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 6 Oct 2010 17:24:00 +0100
+
+kamailio (3.0.2.99) unstable; urgency=low
+
+  * update to 3.0.2.99 for development version builds
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 28 May 2010 22:26:00 +0100
+
+kamailio (3.0.2) unstable; urgency=low
+
+  * update to 3.0.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 27 May 2010 10:27:36 +0100
+
+kamailio (3.0.1) unstable; urgency=low
+
+  * update to 3.0.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 08 Mar 2010 20:30:48 +0100
+
+kamailio (3.0.0) unstable; urgency=low
+
+  * update to 3.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Jan 2010 18:30:42 +0100
+
+kamailio (3.0.0-rc3) unstable; urgency=low
+
+  * update to 3.0.0-rc3 from upstream
+  * updated debian/rules to work with the SIP Router style module packaging
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 10 Dec 2009 12:10:02 +0100
+
+kamailio (3.0.0-rc2) unstable; urgency=low
+
+  * update to 3.0.0-rc2 from upstream
+  * updated debian/rules to work with the new style module packaging
+
+ -- Jonas Bergler <jonas.bergler at staff.snap.net.nz>  Wed, 18 Nov 2009 12:30:02 +1300
+
+kamailio (1.5.0-svn1) unstable; urgency=low
+
+  * increment debian packaging for trunk
+
+ -- Henning Westerholt <henning.westerholt at 1und1.de>  Mon, 02 Mar 2009 17:40:02 +0100
+
+kamailio (1.4.0-svn1) unstable; urgency=low
+
+  [ Klaus Darilion ]
+  * first release of Kamailio (after renaming from Openser)
+
+ -- Julien BLACHE <jblache at debian.org>  Wed, 12 Dec 2007 17:25:31 +0100
+
+
diff --git a/pkg/kamailio/deb/precise/compat b/pkg/kamailio/deb/precise/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/pkg/kamailio/deb/precise/compat
@@ -0,0 +1 @@
+9
diff --git a/pkg/kamailio/deb/precise/control b/pkg/kamailio/deb/precise/control
new file mode 100644
index 0000000..460d157
--- /dev/null
+++ b/pkg/kamailio/deb/precise/control
@@ -0,0 +1,556 @@
+Source: kamailio
+Section: net
+Priority: optional
+Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
+Uploaders: Victor Seva <linuxmaniac at torreviejawireless.org>,
+           Tzafrir Cohen <tzafrir at debian.org>
+Build-Depends: bison,
+               debhelper (>= 9),
+               docbook-xml,
+               dpkg-dev (>= 1.16.1.1),
+               flex,
+               libconfuse-dev,
+               libcurl4-openssl-dev,
+               libdb-dev (>= 4.6.19),
+               libevent-dev,
+               libexpat1-dev,
+               libradiusclient-ng-dev,
+               libgcj12-dev,
+               libgeoip-dev (>= 1.4.5),
+               libhiredis-dev (>= 0.10.0),
+               libjson0-dev,
+               libldap2-dev,
+               liblua5.1-0-dev,
+               libmemcached-dev,
+               libmono-2.0-dev,
+               libmysqlclient-dev,
+               libncurses5-dev,
+               libpcre3-dev,
+               libperl-dev,
+               libpq-dev,
+               libpurple-dev,
+               libreadline-dev,
+               libsasl2-dev,
+               libsctp-dev,
+               libsnmp-dev,
+               libsqlite3-dev,
+               libunistring-dev,
+               libxml2-dev,
+               openssl,
+               python,
+               python-dev,
+               unixodbc-dev,
+               xsltproc,
+               zlib1g-dev
+Standards-Version: 3.9.5
+Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
+
+Package: kamailio
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
+Suggests: kamailio-berkeley-modules,
+          kamailio-carrierroute-modules,
+          kamailio-cpl-modules,
+          kamailio-dbg,
+          kamailio-ldap-modules,
+          kamailio-lua-modules,
+          kamailio-mysql-modules,
+          kamailio-perl-modules,
+          kamailio-postgres-modules,
+          kamailio-presence-modules,
+          kamailio-python-modules,
+          kamailio-radius-modules,
+          kamailio-snmpstats-modules,
+          kamailio-tls-modules,
+          kamailio-unixodbc-modules,
+          kamailio-xml-modules,
+          kamailio-xmpp-modules
+Description: very fast and configurable SIP proxy
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ C Shell-like scripting language provides full control over the server's
+ behaviour. Its modular architecture allows only required functionality to be
+ loaded.
+ .
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
+ .
+ This package contains the main Kamailio binary along with the principal modules
+ and support binaries.
+
+Package: kamailio-dbg
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}
+Description: very fast and configurable SIP proxy [debug symbols]
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the geoip module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Json parser and jsonrpc modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_lua module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_mono module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         python-dev,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_python module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Redis database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Redis NOSQL database driver for Kamailio.
+
+Package: kamailio-mysql-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         mysql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: MySQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the MySQL database driver for Kamailio.
+
+Package: kamailio-postgres-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         postgresql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: PostgreSQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the PostgreSQL database driver for Kamailio.
+
+Package: kamailio-cpl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: CPL module (CPL interpreter engine) for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a CPL (Call Processing Language) interpreter for
+ Kamailio, turning Kamailio into a CPL server (storage and interpreter).
+
+Package: kamailio-radius-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: RADIUS modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
+
+Package: kamailio-unixodbc-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: unixODBC database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the unixODBC database driver for Kamailio.
+
+Package: kamailio-presence-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: SIMPLE presence modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides several Kamailio modules for implementing presence
+ server and presence user agent for RICH presence, registrar-based presence,
+ external triggered presence and XCAP support.
+
+Package: kamailio-perl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Perl extensions and database driver for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides an interface for Kamailio to write Perl extensions and
+ the perlvdb database driver for Kamailio.
+
+Package: kamailio-snmpstats-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         snmpd,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: SNMP AgentX subagent module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the snmpstats module for Kamailio. This module acts
+ as an AgentX subagent which connects to a master agent.
+
+Package: kamailio-purple-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides the purple module, a multi-protocol IM gateway
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the purple module, a multi-protocol instant
+ messaging gateway module.
+
+Package: kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: XMPP gateway module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SIP to XMPP IM translator module for Kamailio.
+
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
+Package: kamailio-carrierroute-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: carrierroute module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the carrierroute module for Kamailio, an integrated
+ solution for routing, balancing and blacklisting.
+
+Package: kamailio-berkeley-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: db5.1-util,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: Berkeley database module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Berkeley database module for Kamailio, a
+ high-performance embedded DB kernel. All database tables are stored
+ in files, no additional server is necessary.
+
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
+Package: kamailio-ldap-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: LDAP modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ldap and h350 modules for Kamailio, enabling LDAP
+ queries from the Kamailio config and storage of SIP account data in an LDAP
+ directory.
+
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: IMS module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
+Package: kamailio-utils-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides a set utility functions for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ Provides a set of utility functions for Kamailio, which are not related
+ to the server configuration.
+
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: sctp module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the sctp module for Kamailio.
+
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: gcj-jre,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_java module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
+
+Package: kamailio-tls-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the TLS kamailio transport module
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
+
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Outbound module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing SIP outbound extension.
+
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Websocket module for kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing WebSocket transport layer.
+
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: authentication using ephemeral credentials module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ephemeral module for Kamailio.
+
+Package: kamailio-extra-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: extra modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides: gzcompress
+
+Package: kamailio-nth
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: binutils,
+         bison,
+         bvi,
+         flex,
+         gcc,
+         gdb,
+         iftop,
+         lsof,
+         mc,
+         most,
+         ngrep,
+         psmisc,
+         screen,
+         sipsak,
+         tcpdump,
+         vim,
+         ${misc:Depends}
+Description: Kamailio - package for "nice to have" installation
+ This is a metapackage for easy installation various useful tools that may be
+ handy on server with Kamailio installed.
diff --git a/pkg/kamailio/deb/precise/copyright b/pkg/kamailio/deb/precise/copyright
new file mode 100644
index 0000000..ff31338
--- /dev/null
+++ b/pkg/kamailio/deb/precise/copyright
@@ -0,0 +1,335 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Kamailio
+Upstream-Contact: sr-dev at lists.sip-router.org
+Source: http://www.kamailio.org/pub/kamailio/
+
+Files: *
+Copyright:
+ 2001-2003 FhG Fokus
+ 2006-2010 iptelorg GmbH
+ Various others (see AUTHORS file)
+License: GPL-2.0+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2012, 2013, 2014 Victor Seva <linuxmaniac at torreviejawireless.org>
+           2009, 2010, 2011, Daniel-Constantin Mierla <miconda at gmail.com>
+           2010, Jon Bonilla <manwe at aholab.ehu.es>
+           2009, Jonas Bergler <jonas.bergler at staff.snap.net.nz>
+           2009, Henning Westerholt <henning.westerholt at 1und1.de>
+           2007, Julien BLACHE <jblache at debian.org>
+License: GPL-2+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+Files: atomic/* atomic_ops.* basex.* bit_*.c char_msg_val.h compiler_opt.h
+ core_stats.h counters.* endianness.* futexlock.h hashes.h io_wait.*
+ kstats_types.h lib/kcore/kstats_wrapper.* lock_ops.c lock_ops_init.h
+ lvalue.* mem/ll_malloc.* mem/memdbg.h mem/sf_malloc.* mi/*.h mod_fix.*
+ modules/tm/rpc_uac.* modules/counters/counters.c modules/tls/sbufq.h
+ modules/tls/tls_bio.* modules/tls/tls_cfg.* modules/tls/tls_cfg.h
+ modules/tls/tls_ct_wrq.* modules/tls/tls_ct_q.h modules/tls/tls_domain.*
+ modules/tls/tls_server.h modules/tls/tls_locking.* modules/tls/tls_rpc.*
+ modules/tls/tls_server.c modules/malloc_test/malloc_test.c modules/blst/blst.c
+ parser/case_p_* parser/case_reas.h pvapi.h pv_core.* rand/fastrand.* raw_*
+ rpc_lookup.* rvalue.* sctp_* ser_time.h shm_init.* sip_msg_clone.* sock_ut.*
+ sr_compat.* str_hash.h switch.* tcp_ev.h tcp_int_send.h tcp_options.*
+ tcp_read.h tcp_stats.* timer_proc.* tls_hooks.* tls_hooks_init.h ver.*
+Copyright: 2006-2010 iptelorg GmbH
+License: ISC
+
+Files: modules/tls/tls_select.* modules/tls/tls_dump_vf.*
+Copyright: 2005-2010 iptelorg GmbH
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: modules/websocket/* modules/outbound/* modules/auth_ephemeral/*
+Copyright: 2012-2013 Crocodile RCS Ltd
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: daemonize.* fastlock.h lock_ops.h mem/mem.* mem/f_malloc.h
+ mem/meminfo.h mem/memtest.c mem/shm_mem.c mem/q_malloc.h mem/q_malloc.c
+ mem/shm_mem.h mem/f_malloc.c modules/tls/tls_rpc.c modules/tls/tls_server.c
+ modules/tls/tls_domain.c modules/tls/tls_domain.h modules/tls/tls_server.h
+ modules/tls/tls_rpc.h pt.c pt.h sched_yield.h ut.c ut.h
+Copyright: 2001-2003 FhG Fokus
+License: ISC
+
+Files: events.* modules/topoh/*
+Copyright: 2009 SIP-Router.org
+License: ISC
+
+Files: modules/mi_rpc/mi_rpc_mod.c modules/pv/pv_xavp.*
+ modules/usrloc/ul_rpc.* ppcfg.* xavp.*
+Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com)
+License: ISC
+
+Files: obsolete/jabber_k/tree234.*
+Copyright: 1999, 2000, 2001, Simon Tatham
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: modules/xmpp/xsnprintf.c obsolete/jabber_s/xsnprintf.c obsolete/jabber_k/xsnprintf.c
+Copyright: 1995-1998, The Apache Group
+License: Apache-1.0
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ 4. The names "Apache Server" and "Apache Group" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission.
+ .
+ 5. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: modules/mi_xmlrpc/abyss*
+Copyright: 2000, Moez Mahfoudh <mmoez at bigfoot.com>
+License: BSD-3-clause
+
+Files: list.h
+Copyright: 1991, 1993 The Regents of the University of California
+License: BSD-3-clause
+
+Files: modules/tm/t_serial.*
+Copyright: 2008 Juha Heinanen
+License: BSD-2-clause
+
+Files: parser/sdp/sdp.* parser/sdp/sdp_helpr_funcs.* parser/sdp/sdp_cloner.h
+Copyright:
+ 2008-2009 SOMA Networks, INC.
+ 2010 VoIP Embedded, Inc
+License: BSD-2-clause
+
+Files: modules/tls/fixed_c_zlib.h
+Copyright:1998-2005 The OpenSSL Project
+Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that
+ this code will not build by default in the Debian packaging.
+License: OpenSSL
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ .
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    openssl-core at openssl.org.
+ .
+ 5. Products derived from this software may not be called "OpenSSL"
+    nor may "OpenSSL" appear in their names without prior written
+    permission of the OpenSSL Project.
+ .
+ 6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ .
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: md5.* md5utils.c
+Copyright: 1991-2, RSA Data Security, Inc
+Comment: Note that md5.c and md5.h have been replaced in the patches
+ plum_md5*.patch .
+ .
+ As for md5utils.c, according to a mail from Upstream (Daniel-Constantin
+ Mierla): while the initial commit log for it states that it is derived
+ from mddriver.c of RFC 1321, it seems that it was, in fact, written from
+ scratch by Jiri Kuthan (a core developer of SER at that time, working for
+ FhG Fokus Institute). As you can see it's rather trivial and uses a data
+ type of SER ("str").  I didn't reimplement it as it's too trivial and
+ looks like there's no other way to implement it.
+License: RSA-MD5
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+ .
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+ .
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+ .
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+
+Files: mem/dl_*
+Copyright: n/a
+License: public-domain
+ This is a version (aka dlmalloc) of malloc/free/realloc written by
+ Doug Lea and released to the public domain, as explained at
+ http://creativecommons.org/licenses/publicdomain.  Send questions,
+ comments, complaints, performance data, etc to dl at cs.oswego.edu
+
+Files: rand/isaac/*
+Copyright: n/a
+License: public-domain
+ By Bob Jenkins.  My random number generator, ISAAC.  Public Domain.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files: lib/srutils/srjson.*
+Copyright: 2009 Dave Gamble
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ ,
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+  1. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/kamailio/deb/precise/kamailio-autheph-modules.lintian-overrides b/pkg/kamailio/deb/precise/kamailio-autheph-modules.lintian-overrides
new file mode 100644
index 0000000..dcb3d18
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio-autheph-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/precise/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/precise/kamailio-berkeley-bin.dirs
new file mode 100644
index 0000000..236670a
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio-berkeley-bin.dirs
@@ -0,0 +1 @@
+usr/sbin
diff --git a/pkg/kamailio/deb/precise/kamailio-dnssec-modules.lintian-overrides b/pkg/kamailio/deb/precise/kamailio-dnssec-modules.lintian-overrides
new file mode 100644
index 0000000..10165fe
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio-dnssec-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/precise/kamailio-outbound-modules.lintian-overrides b/pkg/kamailio/deb/precise/kamailio-outbound-modules.lintian-overrides
new file mode 100644
index 0000000..3050cfe
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio-outbound-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/precise/kamailio-tls-modules.lintian-overrides b/pkg/kamailio/deb/precise/kamailio-tls-modules.lintian-overrides
new file mode 100644
index 0000000..bbe0d37
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio-tls-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-tls-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/precise/kamailio-websocket-modules.lintian-overrides b/pkg/kamailio/deb/precise/kamailio-websocket-modules.lintian-overrides
new file mode 100644
index 0000000..8f384fb
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio-websocket-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/precise/kamailio.README.Debian b/pkg/kamailio/deb/precise/kamailio.README.Debian
new file mode 100644
index 0000000..d25769a
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio.README.Debian
@@ -0,0 +1,39 @@
+Kamailio for Debian
+-------------------
+
+* init script check for fork=no
+-------------------------------
+
+The Kamailio init script will not start Kamailio on boot if fork=no is
+specified in the config file. The check in the initscript will match
+any occurrence of fork=no in the file, even inside C-style comments.
+
+You can disable this check in the init script if you wish; just comment
+out the calls to the check_fork function in the script. Your changes to
+the init script will be preserved upon upgrade, as the file is tagged
+as a conffile.
+
+
+* Kamailio setup
+----------------
+
+To setup Kamailio, you need to:
+ - configure Kamailio properly to suit your needs
+ - edit /etc/default/kamailio, adjust the MEMORY parameter and set
+   RUN_KAMAILIO to "yes"
+
+If you are building an HA cluster using heartbeat or similar, you'll want
+to disable the init script by running:
+
+  update-rc.d kamailio remove
+
+so that Kamailio will not be launched at system startup. You still need
+to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
+script.
+
+Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
+get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
+provided by the kamailio-dbg package.
+
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 11 Dec 2013 16:07:11 +0100
diff --git a/pkg/kamailio/deb/precise/kamailio.default b/pkg/kamailio/deb/precise/kamailio.default
new file mode 100644
index 0000000..0cfc8c8
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio.default
@@ -0,0 +1,28 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+#RUN_KAMAILIO=yes
+
+# User to run as
+#USER=kamailio
+
+# Group to run as
+#GROUP=kamailio
+
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+#SHM_MEMORY=64
+#PKG_MEMORY=4
+
+# Config file
+#CFGFILE=/etc/kamailio/kamailio.cfg
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable Kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes
diff --git a/pkg/kamailio/deb/precise/kamailio.examples b/pkg/kamailio/deb/precise/kamailio.examples
new file mode 100644
index 0000000..c48447a
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio.examples
@@ -0,0 +1,2 @@
+examples/*
+
diff --git a/pkg/kamailio/deb/precise/kamailio.init b/pkg/kamailio/deb/precise/kamailio.init
new file mode 100644
index 0000000..d4801d2
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio.init
@@ -0,0 +1,162 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          kamailio
+# Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
+# Required-Stop:     $syslog $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start the Kamailio SIP proxy server
+# Description:       Start the Kamailio SIP proxy server
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/kamailio
+NAME=kamailio
+DESC="Kamailio SIP server"
+HOMEDIR=/var/run/kamailio
+PIDFILE=$HOMEDIR/$NAME.pid
+DEFAULTS=/etc/default/kamailio
+CFGFILE=/etc/kamailio/kamailio.cfg
+RUN_KAMAILIO=no
+USER=kamailio
+GROUP=kamailio
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+PKG_MEMORY=4
+DUMP_CORE=no
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
+}
+
+check_kamailio_config ()
+{
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_failure_msg
+	    exit 1
+	fi
+}
+
+create_radius_seqfile ()
+{
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
+}
+
+test -f $DAEMON || exit 0
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+set -e
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
+fi
+
+OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
+
+case "$1" in
+  start|debug)
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
+  restart|force-reload)
+	check_kamailio_config
+	create_radius_seqfile
+
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+  status)
+	log_daemon_msg "Status of $DESC: "
+
+	status_of_proc -p"$PIDFILE" $NAME $NAME
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/pkg/kamailio/deb/precise/kamailio.lintian-overrides b/pkg/kamailio/deb/precise/kamailio.lintian-overrides
new file mode 100644
index 0000000..18152ed
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio.lintian-overrides
@@ -0,0 +1,2 @@
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge.cfg #!KAMAILIO
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/registrar.cfg #!KAMAILIO
diff --git a/pkg/kamailio/deb/precise/kamailio.postinst b/pkg/kamailio/deb/precise/kamailio.postinst
new file mode 100644
index 0000000..4ee38ec
--- /dev/null
+++ b/pkg/kamailio/deb/precise/kamailio.postinst
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        adduser --quiet --system --group --disabled-password \
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
+
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
diff --git a/pkg/kamailio/deb/precise/rules b/pkg/kamailio/deb/precise/rules
new file mode 100755
index 0000000..fdf4d36
--- /dev/null
+++ b/pkg/kamailio/deb/precise/rules
@@ -0,0 +1,220 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# java stuff using libgcj12
+export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
+
+# choose freeradius
+
+# modules not in the "main" kamailio package
+EXCLUDED_MODULES=
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main kamailio package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy mi_xmlrpc dnssec
+
+# module groups that are packaged in seperate packages
+# (with the name kamailio-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   purple tls outbound websocket autheph 
+
+# module groups to be packaged onto kamailio-extra-modules
+EXTRA_GROUPS=gzcompress
+
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
+
+# "function" to get package short name out of a dir/module_name
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
+		$(MAKE) every-module group_include="k$(grp)"
+	)
+endef
+
+
+define PACKAGE_GRP_INSTALL_template
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		doc-dir=share/doc/kamailio-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
+	)
+endef
+
+define PACKAGE_EXTRA_INSTALL_template
+	$(foreach grp,$(EXTRA_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
+		doc-dir=share/doc/kamailio-extra-modules
+	)
+	# eliminate duplicate libs
+	-for d in $(DUP_LIBS_DIRS); do \
+		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
+		for r in `find $$d -name 'lib*'|xargs`; do \
+			echo "removing extra lib `basename $$r` present also in $$d";\
+			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+		done ; \
+	done
+	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
+			cfg_target=/etc/kamailio/ \
+			basedir=$(CURDIR)/debian/kamailio \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
+			group_include="kstandard"
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# Add here commands to clean up after the build process.
+	$(MAKE) maintainer-clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	# Add here commands to install the package into debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	$(call PACKAGE_EXTRA_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
+	# install /etc/default/kamailio file
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
+	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installinit -pkamailio -- defaults 23
+	dh_installcron
+	dh_installman
+	dh_installinfo
+	dh_lintian
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip --dbg-package=kamailio-dbg
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-independent packages using the common target
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+# We have nothing to do by default.
+
+
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
diff --git a/pkg/kamailio/deb/precise/source.lintian-overrides b/pkg/kamailio/deb/precise/source.lintian-overrides
new file mode 100644
index 0000000..620d9ff
--- /dev/null
+++ b/pkg/kamailio/deb/precise/source.lintian-overrides
@@ -0,0 +1 @@
+kamailio source: debian-watch-file-in-native-package
diff --git a/pkg/kamailio/deb/precise/source/format b/pkg/kamailio/deb/precise/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/pkg/kamailio/deb/precise/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/pkg/kamailio/deb/precise/watch b/pkg/kamailio/deb/precise/watch
new file mode 100644
index 0000000..c50f31f
--- /dev/null
+++ b/pkg/kamailio/deb/precise/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz
diff --git a/pkg/kamailio/deb/squeeze/changelog b/pkg/kamailio/deb/squeeze/changelog
new file mode 100644
index 0000000..f470e3d
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/changelog
@@ -0,0 +1,112 @@
+kamailio (4.1.4) unstable; urgency=low
+
+  * update to 4.1.4 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 12 Jun 2014 15:55:55 +0100
+
+kamailio (4.1.3) unstable; urgency=low
+
+  * update to 4.1.3 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 24 Apr 2014 10:45:20 +0100
+
+kamailio (4.1.2) unstable; urgency=low
+
+  * update to 4.1.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 06 Mar 2014 15:25:35 +0100
+
+kamailio (4.1.1) unstable; urgency=low
+
+  * update to 4.1.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 09 Jan 2014 15:45:35 +0100
+
+kamailio (4.1.0) unstable; urgency=low
+
+  * update to 4.1.0
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 04 Dec 2013 11:42:27 +0100
+
+kamailio (4.0.0) unstable; urgency=low
+
+  * update to 4.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Mar 2013 10:40:30 +0100
+
+kamailio (3.4.0~dev0) unstable; urgency=low
+
+  * update version to 3.4.0~dev0
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 15 Jun 2012 03:15:00 +0100
+
+kamailio (3.2.0) unstable; urgency=low
+
+  * update to 3.2.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 29 Apr 2011 12:25:30 +0100
+
+kamailio (3.1.1) unstable; urgency=low
+
+  * update to 3.1.1 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 3 Dec 2010 16:30:00 +0100
+
+kamailio (3.1.0) unstable; urgency=low
+
+  * update to 3.1.0 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 6 Oct 2010 17:24:00 +0100
+
+kamailio (3.0.2.99) unstable; urgency=low
+
+  * update to 3.0.2.99 for development version builds
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 28 May 2010 22:26:00 +0100
+
+kamailio (3.0.2) unstable; urgency=low
+
+  * update to 3.0.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 27 May 2010 10:27:36 +0100
+
+kamailio (3.0.1) unstable; urgency=low
+
+  * update to 3.0.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 08 Mar 2010 20:30:48 +0100
+
+kamailio (3.0.0) unstable; urgency=low
+
+  * update to 3.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Jan 2010 18:30:42 +0100
+
+kamailio (3.0.0-rc3) unstable; urgency=low
+
+  * update to 3.0.0-rc3 from upstream
+  * updated debian/rules to work with the SIP Router style module packaging
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 10 Dec 2009 12:10:02 +0100
+
+kamailio (3.0.0-rc2) unstable; urgency=low
+
+  * update to 3.0.0-rc2 from upstream
+  * updated debian/rules to work with the new style module packaging
+
+ -- Jonas Bergler <jonas.bergler at staff.snap.net.nz>  Wed, 18 Nov 2009 12:30:02 +1300
+
+kamailio (1.5.0-svn1) unstable; urgency=low
+
+  * increment debian packaging for trunk
+
+ -- Henning Westerholt <henning.westerholt at 1und1.de>  Mon, 02 Mar 2009 17:40:02 +0100
+
+kamailio (1.4.0-svn1) unstable; urgency=low
+
+  [ Klaus Darilion ]
+  * first release of Kamailio (after renaming from Openser)
+
+ -- Julien BLACHE <jblache at debian.org>  Wed, 12 Dec 2007 17:25:31 +0100
+
+
diff --git a/pkg/kamailio/deb/squeeze/compat b/pkg/kamailio/deb/squeeze/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/compat
@@ -0,0 +1 @@
+8
diff --git a/pkg/kamailio/deb/squeeze/control b/pkg/kamailio/deb/squeeze/control
new file mode 100644
index 0000000..80130d1
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/control
@@ -0,0 +1,456 @@
+Source: kamailio
+Section: net
+Priority: optional
+Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
+Uploaders: Victor Seva <linuxmaniac at torreviejawireless.org>,
+           Tzafrir Cohen <tzafrir at debian.org>
+Build-Depends: bison,
+               debhelper (>= 8), 
+               docbook-xml,
+               flex,
+               libconfuse-dev,
+               libcurl4-openssl-dev,
+               libdb-dev (>= 4.6.19),
+               libevent-dev,
+               libexpat1-dev,
+               libradiusclient-ng-dev,
+               libgeoip-dev (>= 1.4.5),
+               libjson0-dev,
+               libldap2-dev,
+               liblua5.1-0-dev,
+               libmemcached-dev,
+               libmysqlclient-dev,
+               libncurses5-dev,
+               libpcre3-dev,
+               libperl-dev,
+               libpq-dev,
+               libreadline-dev,
+               libsasl2-dev,
+               libsnmp-dev,
+               libsqlite3-dev,
+               libunistring-dev,
+               libxml2-dev,
+               libxmlrpc-c3-dev,
+               openssl,
+               python,
+               python-dev,
+               unixodbc-dev,
+               xsltproc,
+               zlib1g-dev
+Standards-Version: 3.9.5
+Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
+
+Package: kamailio
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
+Suggests: kamailio-berkeley-modules,
+          kamailio-carrierroute-modules,
+          kamailio-cpl-modules,
+          kamailio-dbg,
+          kamailio-ldap-modules,
+          kamailio-lua-modules,
+          kamailio-mysql-modules,
+          kamailio-perl-modules,
+          kamailio-postgres-modules,
+          kamailio-presence-modules,
+          kamailio-python-modules,
+          kamailio-radius-modules,
+          kamailio-snmpstats-modules,
+          kamailio-tls-modules,
+          kamailio-unixodbc-modules,
+          kamailio-xml-modules,
+          kamailio-xmpp-modules
+Description: very fast and configurable SIP proxy
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ C Shell-like scripting language provides full control over the server's
+ behaviour. Its modular architecture allows only required functionality to be
+ loaded.
+ .
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
+ .
+ This package contains the main Kamailio binary along with the principal modules
+ and support binaries.
+
+Package: kamailio-dbg
+Priority: extra
+Section: debug
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}
+Description: very fast and configurable SIP proxy [debug symbols]
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the geoip module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Json parser and jsonrpc modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_lua module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         python-dev,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_python module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-mysql-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         mysql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: MySQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the MySQL database driver for Kamailio.
+
+Package: kamailio-postgres-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         postgresql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: PostgreSQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the PostgreSQL database driver for Kamailio.
+
+Package: kamailio-cpl-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: CPL module (CPL interpreter engine) for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a CPL (Call Processing Language) interpreter for
+ Kamailio, turning Kamailio into a CPL server (storage and interpreter).
+
+Package: kamailio-radius-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: RADIUS modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
+
+Package: kamailio-unixodbc-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: unixODBC database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the unixODBC database driver for Kamailio.
+
+Package: kamailio-presence-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: SIMPLE presence modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides several Kamailio modules for implementing presence
+ server and presence user agent for RICH presence, registrar-based presence,
+ external triggered presence and XCAP support.
+
+Package: kamailio-perl-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Perl extensions and database driver for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides an interface for Kamailio to write Perl extensions and
+ the perlvdb database driver for Kamailio.
+
+Package: kamailio-snmpstats-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         snmpd,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: SNMP AgentX subagent module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the snmpstats module for Kamailio. This module acts
+ as an AgentX subagent which connects to a master agent.
+
+Package: kamailio-xmpp-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: XMPP gateway module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SIP to XMPP IM translator module for Kamailio.
+
+Package: kamailio-xml-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
+Package: kamailio-carrierroute-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: carrierroute module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the carrierroute module for Kamailio, an integrated
+ solution for routing, balancing and blacklisting.
+
+Package: kamailio-berkeley-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: db5.1-util,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: Berkeley database module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Berkeley database module for Kamailio, a
+ high-performance embedded DB kernel. All database tables are stored
+ in files, no additional server is necessary.
+
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
+Package: kamailio-ldap-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: LDAP modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ldap and h350 modules for Kamailio, enabling LDAP
+ queries from the Kamailio config and storage of SIP account data in an LDAP
+ directory.
+
+Package: kamailio-ims-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: IMS module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
+Package: kamailio-utils-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides a set utility functions for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ Provides a set of utility functions for Kamailio, which are not related
+ to the server configuration.
+
+Package: kamailio-tls-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the TLS kamailio transport module
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
+
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Outbound module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing SIP outbound extension.
+
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Websocket module for kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing WebSocket transport layer.
+
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: authentication using ephemeral credentials module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ephemeral module for Kamailio.
+
+Package: kamailio-extra-modules
+Architecture: linux-any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: extra modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides: gzcompress
+
+Package: kamailio-nth
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: binutils,
+         bison,
+         bvi,
+         flex,
+         gcc,
+         gdb,
+         iftop,
+         lsof,
+         mc,
+         most,
+         ngrep,
+         psmisc,
+         screen,
+         sipsak,
+         tcpdump,
+         vim,
+         ${misc:Depends}
+Description: Kamailio - package for "nice to have" installation
+ This is a metapackage for easy installation various useful tools that may be
+ handy on server with Kamailio installed.
diff --git a/pkg/kamailio/deb/squeeze/copyright b/pkg/kamailio/deb/squeeze/copyright
new file mode 100644
index 0000000..ff31338
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/copyright
@@ -0,0 +1,335 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Kamailio
+Upstream-Contact: sr-dev at lists.sip-router.org
+Source: http://www.kamailio.org/pub/kamailio/
+
+Files: *
+Copyright:
+ 2001-2003 FhG Fokus
+ 2006-2010 iptelorg GmbH
+ Various others (see AUTHORS file)
+License: GPL-2.0+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2012, 2013, 2014 Victor Seva <linuxmaniac at torreviejawireless.org>
+           2009, 2010, 2011, Daniel-Constantin Mierla <miconda at gmail.com>
+           2010, Jon Bonilla <manwe at aholab.ehu.es>
+           2009, Jonas Bergler <jonas.bergler at staff.snap.net.nz>
+           2009, Henning Westerholt <henning.westerholt at 1und1.de>
+           2007, Julien BLACHE <jblache at debian.org>
+License: GPL-2+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+Files: atomic/* atomic_ops.* basex.* bit_*.c char_msg_val.h compiler_opt.h
+ core_stats.h counters.* endianness.* futexlock.h hashes.h io_wait.*
+ kstats_types.h lib/kcore/kstats_wrapper.* lock_ops.c lock_ops_init.h
+ lvalue.* mem/ll_malloc.* mem/memdbg.h mem/sf_malloc.* mi/*.h mod_fix.*
+ modules/tm/rpc_uac.* modules/counters/counters.c modules/tls/sbufq.h
+ modules/tls/tls_bio.* modules/tls/tls_cfg.* modules/tls/tls_cfg.h
+ modules/tls/tls_ct_wrq.* modules/tls/tls_ct_q.h modules/tls/tls_domain.*
+ modules/tls/tls_server.h modules/tls/tls_locking.* modules/tls/tls_rpc.*
+ modules/tls/tls_server.c modules/malloc_test/malloc_test.c modules/blst/blst.c
+ parser/case_p_* parser/case_reas.h pvapi.h pv_core.* rand/fastrand.* raw_*
+ rpc_lookup.* rvalue.* sctp_* ser_time.h shm_init.* sip_msg_clone.* sock_ut.*
+ sr_compat.* str_hash.h switch.* tcp_ev.h tcp_int_send.h tcp_options.*
+ tcp_read.h tcp_stats.* timer_proc.* tls_hooks.* tls_hooks_init.h ver.*
+Copyright: 2006-2010 iptelorg GmbH
+License: ISC
+
+Files: modules/tls/tls_select.* modules/tls/tls_dump_vf.*
+Copyright: 2005-2010 iptelorg GmbH
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: modules/websocket/* modules/outbound/* modules/auth_ephemeral/*
+Copyright: 2012-2013 Crocodile RCS Ltd
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: daemonize.* fastlock.h lock_ops.h mem/mem.* mem/f_malloc.h
+ mem/meminfo.h mem/memtest.c mem/shm_mem.c mem/q_malloc.h mem/q_malloc.c
+ mem/shm_mem.h mem/f_malloc.c modules/tls/tls_rpc.c modules/tls/tls_server.c
+ modules/tls/tls_domain.c modules/tls/tls_domain.h modules/tls/tls_server.h
+ modules/tls/tls_rpc.h pt.c pt.h sched_yield.h ut.c ut.h
+Copyright: 2001-2003 FhG Fokus
+License: ISC
+
+Files: events.* modules/topoh/*
+Copyright: 2009 SIP-Router.org
+License: ISC
+
+Files: modules/mi_rpc/mi_rpc_mod.c modules/pv/pv_xavp.*
+ modules/usrloc/ul_rpc.* ppcfg.* xavp.*
+Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com)
+License: ISC
+
+Files: obsolete/jabber_k/tree234.*
+Copyright: 1999, 2000, 2001, Simon Tatham
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: modules/xmpp/xsnprintf.c obsolete/jabber_s/xsnprintf.c obsolete/jabber_k/xsnprintf.c
+Copyright: 1995-1998, The Apache Group
+License: Apache-1.0
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ 4. The names "Apache Server" and "Apache Group" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission.
+ .
+ 5. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: modules/mi_xmlrpc/abyss*
+Copyright: 2000, Moez Mahfoudh <mmoez at bigfoot.com>
+License: BSD-3-clause
+
+Files: list.h
+Copyright: 1991, 1993 The Regents of the University of California
+License: BSD-3-clause
+
+Files: modules/tm/t_serial.*
+Copyright: 2008 Juha Heinanen
+License: BSD-2-clause
+
+Files: parser/sdp/sdp.* parser/sdp/sdp_helpr_funcs.* parser/sdp/sdp_cloner.h
+Copyright:
+ 2008-2009 SOMA Networks, INC.
+ 2010 VoIP Embedded, Inc
+License: BSD-2-clause
+
+Files: modules/tls/fixed_c_zlib.h
+Copyright:1998-2005 The OpenSSL Project
+Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that
+ this code will not build by default in the Debian packaging.
+License: OpenSSL
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ .
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    openssl-core at openssl.org.
+ .
+ 5. Products derived from this software may not be called "OpenSSL"
+    nor may "OpenSSL" appear in their names without prior written
+    permission of the OpenSSL Project.
+ .
+ 6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ .
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: md5.* md5utils.c
+Copyright: 1991-2, RSA Data Security, Inc
+Comment: Note that md5.c and md5.h have been replaced in the patches
+ plum_md5*.patch .
+ .
+ As for md5utils.c, according to a mail from Upstream (Daniel-Constantin
+ Mierla): while the initial commit log for it states that it is derived
+ from mddriver.c of RFC 1321, it seems that it was, in fact, written from
+ scratch by Jiri Kuthan (a core developer of SER at that time, working for
+ FhG Fokus Institute). As you can see it's rather trivial and uses a data
+ type of SER ("str").  I didn't reimplement it as it's too trivial and
+ looks like there's no other way to implement it.
+License: RSA-MD5
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+ .
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+ .
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+ .
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+
+Files: mem/dl_*
+Copyright: n/a
+License: public-domain
+ This is a version (aka dlmalloc) of malloc/free/realloc written by
+ Doug Lea and released to the public domain, as explained at
+ http://creativecommons.org/licenses/publicdomain.  Send questions,
+ comments, complaints, performance data, etc to dl at cs.oswego.edu
+
+Files: rand/isaac/*
+Copyright: n/a
+License: public-domain
+ By Bob Jenkins.  My random number generator, ISAAC.  Public Domain.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files: lib/srutils/srjson.*
+Copyright: 2009 Dave Gamble
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ ,
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+  1. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/kamailio/deb/squeeze/kamailio-autheph-modules.lintian-overrides b/pkg/kamailio/deb/squeeze/kamailio-autheph-modules.lintian-overrides
new file mode 100644
index 0000000..dcb3d18
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio-autheph-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/squeeze/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/squeeze/kamailio-berkeley-bin.dirs
new file mode 100644
index 0000000..236670a
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio-berkeley-bin.dirs
@@ -0,0 +1 @@
+usr/sbin
diff --git a/pkg/kamailio/deb/squeeze/kamailio-dnssec-modules.lintian-overrides b/pkg/kamailio/deb/squeeze/kamailio-dnssec-modules.lintian-overrides
new file mode 100644
index 0000000..10165fe
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio-dnssec-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/squeeze/kamailio-outbound-modules.lintian-overrides b/pkg/kamailio/deb/squeeze/kamailio-outbound-modules.lintian-overrides
new file mode 100644
index 0000000..3050cfe
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio-outbound-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/squeeze/kamailio-tls-modules.lintian-overrides b/pkg/kamailio/deb/squeeze/kamailio-tls-modules.lintian-overrides
new file mode 100644
index 0000000..bbe0d37
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio-tls-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-tls-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/squeeze/kamailio-websocket-modules.lintian-overrides b/pkg/kamailio/deb/squeeze/kamailio-websocket-modules.lintian-overrides
new file mode 100644
index 0000000..8f384fb
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio-websocket-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/squeeze/kamailio.README.Debian b/pkg/kamailio/deb/squeeze/kamailio.README.Debian
new file mode 100644
index 0000000..d25769a
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio.README.Debian
@@ -0,0 +1,39 @@
+Kamailio for Debian
+-------------------
+
+* init script check for fork=no
+-------------------------------
+
+The Kamailio init script will not start Kamailio on boot if fork=no is
+specified in the config file. The check in the initscript will match
+any occurrence of fork=no in the file, even inside C-style comments.
+
+You can disable this check in the init script if you wish; just comment
+out the calls to the check_fork function in the script. Your changes to
+the init script will be preserved upon upgrade, as the file is tagged
+as a conffile.
+
+
+* Kamailio setup
+----------------
+
+To setup Kamailio, you need to:
+ - configure Kamailio properly to suit your needs
+ - edit /etc/default/kamailio, adjust the MEMORY parameter and set
+   RUN_KAMAILIO to "yes"
+
+If you are building an HA cluster using heartbeat or similar, you'll want
+to disable the init script by running:
+
+  update-rc.d kamailio remove
+
+so that Kamailio will not be launched at system startup. You still need
+to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
+script.
+
+Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
+get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
+provided by the kamailio-dbg package.
+
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 11 Dec 2013 16:07:11 +0100
diff --git a/pkg/kamailio/deb/squeeze/kamailio.default b/pkg/kamailio/deb/squeeze/kamailio.default
new file mode 100644
index 0000000..0cfc8c8
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio.default
@@ -0,0 +1,28 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+#RUN_KAMAILIO=yes
+
+# User to run as
+#USER=kamailio
+
+# Group to run as
+#GROUP=kamailio
+
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+#SHM_MEMORY=64
+#PKG_MEMORY=4
+
+# Config file
+#CFGFILE=/etc/kamailio/kamailio.cfg
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable Kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes
diff --git a/pkg/kamailio/deb/squeeze/kamailio.examples b/pkg/kamailio/deb/squeeze/kamailio.examples
new file mode 100644
index 0000000..c48447a
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio.examples
@@ -0,0 +1,2 @@
+examples/*
+
diff --git a/pkg/kamailio/deb/squeeze/kamailio.init b/pkg/kamailio/deb/squeeze/kamailio.init
new file mode 100644
index 0000000..d4801d2
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio.init
@@ -0,0 +1,162 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          kamailio
+# Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
+# Required-Stop:     $syslog $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start the Kamailio SIP proxy server
+# Description:       Start the Kamailio SIP proxy server
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/kamailio
+NAME=kamailio
+DESC="Kamailio SIP server"
+HOMEDIR=/var/run/kamailio
+PIDFILE=$HOMEDIR/$NAME.pid
+DEFAULTS=/etc/default/kamailio
+CFGFILE=/etc/kamailio/kamailio.cfg
+RUN_KAMAILIO=no
+USER=kamailio
+GROUP=kamailio
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+PKG_MEMORY=4
+DUMP_CORE=no
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
+}
+
+check_kamailio_config ()
+{
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_failure_msg
+	    exit 1
+	fi
+}
+
+create_radius_seqfile ()
+{
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
+}
+
+test -f $DAEMON || exit 0
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+set -e
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
+fi
+
+OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
+
+case "$1" in
+  start|debug)
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
+  restart|force-reload)
+	check_kamailio_config
+	create_radius_seqfile
+
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+  status)
+	log_daemon_msg "Status of $DESC: "
+
+	status_of_proc -p"$PIDFILE" $NAME $NAME
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/pkg/kamailio/deb/squeeze/kamailio.lintian-overrides b/pkg/kamailio/deb/squeeze/kamailio.lintian-overrides
new file mode 100644
index 0000000..18152ed
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio.lintian-overrides
@@ -0,0 +1,2 @@
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge.cfg #!KAMAILIO
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/registrar.cfg #!KAMAILIO
diff --git a/pkg/kamailio/deb/squeeze/kamailio.postinst b/pkg/kamailio/deb/squeeze/kamailio.postinst
new file mode 100644
index 0000000..4ee38ec
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/kamailio.postinst
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        adduser --quiet --system --group --disabled-password \
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
+
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
diff --git a/pkg/kamailio/deb/squeeze/rules b/pkg/kamailio/deb/squeeze/rules
new file mode 100755
index 0000000..df52d67
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/rules
@@ -0,0 +1,218 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# stuff using libgcj12
+export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
+
+# choose freeradius
+
+# modules not in the "main" kamailio package
+EXCLUDED_MODULES=
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main kamailio package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy java dnssec sctp purple redis mono
+
+# module groups that are packaged in seperate packages
+# (with the name kamailio-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl python geoip\
+			   sqlite json ims \
+			   tls outbound websocket autheph 
+
+# module groups to be packaged onto kamailio-extra-modules
+EXTRA_GROUPS=gzcompress
+
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
+
+# "function" to get package short name out of a dir/module_name
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
+		$(MAKE) every-module group_include="k$(grp)"
+	)
+endef
+
+
+define PACKAGE_GRP_INSTALL_template
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		doc-dir=share/doc/kamailio-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
+	)
+endef
+
+define PACKAGE_EXTRA_INSTALL_template
+	$(foreach grp,$(EXTRA_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
+		doc-dir=share/doc/kamailio-extra-modules
+	)
+	# eliminate duplicate libs
+	-for d in $(DUP_LIBS_DIRS); do \
+		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
+		for r in `find $$d -name 'lib*'|xargs`; do \
+			echo "removing extra lib `basename $$r` present also in $$d";\
+			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+		done ; \
+	done
+	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
+			cfg_target=/etc/kamailio/ \
+			basedir=$(CURDIR)/debian/kamailio \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
+			group_include="kstandard"
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# Add here commands to clean up after the build process.
+	$(MAKE) maintainer-clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	# Add here commands to install the package into debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	$(call PACKAGE_EXTRA_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
+	# install /etc/default/kamailio file
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
+	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installinit -pkamailio -- defaults 23
+	dh_installcron
+	dh_installman
+	dh_installinfo
+	dh_lintian
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip --dbg-package=kamailio-dbg
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-independent packages using the common target
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+# We have nothing to do by default.
+
+
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
diff --git a/pkg/kamailio/deb/squeeze/source.lintian-overrides b/pkg/kamailio/deb/squeeze/source.lintian-overrides
new file mode 100644
index 0000000..620d9ff
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/source.lintian-overrides
@@ -0,0 +1 @@
+kamailio source: debian-watch-file-in-native-package
diff --git a/pkg/kamailio/deb/squeeze/source/format b/pkg/kamailio/deb/squeeze/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/pkg/kamailio/deb/squeeze/watch b/pkg/kamailio/deb/squeeze/watch
new file mode 100644
index 0000000..c50f31f
--- /dev/null
+++ b/pkg/kamailio/deb/squeeze/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz
diff --git a/pkg/kamailio/deb/wheezy/changelog b/pkg/kamailio/deb/wheezy/changelog
new file mode 100644
index 0000000..f470e3d
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/changelog
@@ -0,0 +1,112 @@
+kamailio (4.1.4) unstable; urgency=low
+
+  * update to 4.1.4 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 12 Jun 2014 15:55:55 +0100
+
+kamailio (4.1.3) unstable; urgency=low
+
+  * update to 4.1.3 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 24 Apr 2014 10:45:20 +0100
+
+kamailio (4.1.2) unstable; urgency=low
+
+  * update to 4.1.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 06 Mar 2014 15:25:35 +0100
+
+kamailio (4.1.1) unstable; urgency=low
+
+  * update to 4.1.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 09 Jan 2014 15:45:35 +0100
+
+kamailio (4.1.0) unstable; urgency=low
+
+  * update to 4.1.0
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 04 Dec 2013 11:42:27 +0100
+
+kamailio (4.0.0) unstable; urgency=low
+
+  * update to 4.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Mar 2013 10:40:30 +0100
+
+kamailio (3.4.0~dev0) unstable; urgency=low
+
+  * update version to 3.4.0~dev0
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 15 Jun 2012 03:15:00 +0100
+
+kamailio (3.2.0) unstable; urgency=low
+
+  * update to 3.2.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 29 Apr 2011 12:25:30 +0100
+
+kamailio (3.1.1) unstable; urgency=low
+
+  * update to 3.1.1 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 3 Dec 2010 16:30:00 +0100
+
+kamailio (3.1.0) unstable; urgency=low
+
+  * update to 3.1.0 from upstream
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Wed, 6 Oct 2010 17:24:00 +0100
+
+kamailio (3.0.2.99) unstable; urgency=low
+
+  * update to 3.0.2.99 for development version builds
+
+ -- Jon Bonilla <manwe at aholab.ehu.es>  Fri, 28 May 2010 22:26:00 +0100
+
+kamailio (3.0.2) unstable; urgency=low
+
+  * update to 3.0.2 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Thu, 27 May 2010 10:27:36 +0100
+
+kamailio (3.0.1) unstable; urgency=low
+
+  * update to 3.0.1 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 08 Mar 2010 20:30:48 +0100
+
+kamailio (3.0.0) unstable; urgency=low
+
+  * update to 3.0.0 from upstream
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Mon, 11 Jan 2010 18:30:42 +0100
+
+kamailio (3.0.0-rc3) unstable; urgency=low
+
+  * update to 3.0.0-rc3 from upstream
+  * updated debian/rules to work with the SIP Router style module packaging
+
+ -- Daniel-Constantin Mierla <miconda at gmail.com>  Fri, 10 Dec 2009 12:10:02 +0100
+
+kamailio (3.0.0-rc2) unstable; urgency=low
+
+  * update to 3.0.0-rc2 from upstream
+  * updated debian/rules to work with the new style module packaging
+
+ -- Jonas Bergler <jonas.bergler at staff.snap.net.nz>  Wed, 18 Nov 2009 12:30:02 +1300
+
+kamailio (1.5.0-svn1) unstable; urgency=low
+
+  * increment debian packaging for trunk
+
+ -- Henning Westerholt <henning.westerholt at 1und1.de>  Mon, 02 Mar 2009 17:40:02 +0100
+
+kamailio (1.4.0-svn1) unstable; urgency=low
+
+  [ Klaus Darilion ]
+  * first release of Kamailio (after renaming from Openser)
+
+ -- Julien BLACHE <jblache at debian.org>  Wed, 12 Dec 2007 17:25:31 +0100
+
+
diff --git a/pkg/kamailio/deb/wheezy/compat b/pkg/kamailio/deb/wheezy/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/compat
@@ -0,0 +1 @@
+9
diff --git a/pkg/kamailio/deb/wheezy/control b/pkg/kamailio/deb/wheezy/control
new file mode 100644
index 0000000..8c37645
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/control
@@ -0,0 +1,542 @@
+Source: kamailio
+Section: net
+Priority: optional
+Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
+Uploaders: Victor Seva <linuxmaniac at torreviejawireless.org>,
+           Tzafrir Cohen <tzafrir at debian.org>
+Build-Depends: bison,
+               debhelper (>= 9),
+               docbook-xml,
+               dpkg-dev (>= 1.16.1.1),
+               flex,
+               libconfuse-dev,
+               libcurl4-openssl-dev,
+               libdb-dev (>= 4.6.19),
+               libevent-dev,
+               libexpat1-dev,
+               libradiusclient-ng-dev,
+               libgcj12-dev,
+               libgeoip-dev (>= 1.4.5),
+               libhiredis-dev (>= 0.10.0),
+               libjson0-dev,
+               libldap2-dev,
+               liblua5.1-0-dev,
+               libmemcached-dev,
+               libmono-2.0-dev,
+               libmysqlclient-dev,
+               libncurses5-dev,
+               libpcre3-dev,
+               libperl-dev,
+               libpq-dev,
+               libreadline-dev,
+               libsasl2-dev,
+               libsctp-dev,
+               libsnmp-dev,
+               libsqlite3-dev,
+               libunistring-dev,
+               libxml2-dev,
+               openssl,
+               python,
+               python-dev,
+               unixodbc-dev,
+               xsltproc,
+               zlib1g-dev
+Standards-Version: 3.9.5
+Homepage: http://www.kamailio.org/
+Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
+
+Package: kamailio
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
+Suggests: kamailio-berkeley-modules,
+          kamailio-carrierroute-modules,
+          kamailio-cpl-modules,
+          kamailio-dbg,
+          kamailio-ldap-modules,
+          kamailio-lua-modules,
+          kamailio-mysql-modules,
+          kamailio-perl-modules,
+          kamailio-postgres-modules,
+          kamailio-presence-modules,
+          kamailio-python-modules,
+          kamailio-radius-modules,
+          kamailio-snmpstats-modules,
+          kamailio-tls-modules,
+          kamailio-unixodbc-modules,
+          kamailio-xml-modules,
+          kamailio-xmpp-modules
+Description: very fast and configurable SIP proxy
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ C Shell-like scripting language provides full control over the server's
+ behaviour. Its modular architecture allows only required functionality to be
+ loaded.
+ .
+ Among others, the following modules are available: digest authentication, CPL
+ scripts, instant messaging, MySQL support, presence agent, RADIUS
+ authentication, record routing, SMS gateway, Jabber/XMPP gateway, transaction
+ module, registrar and user location, XML-RPC interface.
+ .
+ This package contains the main Kamailio binary along with the principal modules
+ and support binaries.
+
+Package: kamailio-dbg
+Priority: extra
+Section: debug
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}
+Description: very fast and configurable SIP proxy [debug symbols]
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the debugging symbols for the Kamailio binaries and
+ modules. You only need to install it if you need to debug Kamailio.
+
+Package: kamailio-geoip-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the geoip module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the geoip module, an extension allowing to
+ use GeoIP API within configuration file.
+
+Package: kamailio-sqlite-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Recommends: sqlite3
+Description: SQLite database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SQLite database driver for Kamailio.
+
+Package: kamailio-json-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Json parser and jsonrpc modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides json parser for Kamailio's configuration file
+ and the JSON-RPC client over netstrings.
+
+Package: kamailio-memcached-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-memcached-module
+Description: Provides the memcached module, an interface to the memcached server
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the memcached module, an interface to the memcached
+ server, a high-performance, distributed memory object caching system.
+
+Package: kamailio-lua-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_lua module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
+
+Package: kamailio-mono-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the app_mono module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_mono module, an extension allowing to
+ execute embedded Mono applications within configuration file.
+
+Package: kamailio-python-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         python-dev,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_python module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_python module, an extension allowing to
+ execute embedded Python applications within configuration file.
+
+Package: kamailio-redis-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Redis database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Redis NOSQL database driver for Kamailio.
+
+Package: kamailio-mysql-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         mysql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: MySQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the MySQL database driver for Kamailio.
+
+Package: kamailio-postgres-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         postgresql-client,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: PostgreSQL database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the PostgreSQL database driver for Kamailio.
+
+Package: kamailio-cpl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: CPL module (CPL interpreter engine) for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a CPL (Call Processing Language) interpreter for
+ Kamailio, turning Kamailio into a CPL server (storage and interpreter).
+
+Package: kamailio-radius-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: RADIUS modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides a set of RADIUS modules for Kamailio, for
+ authentication, peering, group membership and messages URIs checking against a
+ RADIUS server.
+
+Package: kamailio-unixodbc-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: unixODBC database connectivity module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the unixODBC database driver for Kamailio.
+
+Package: kamailio-presence-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: SIMPLE presence modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides several Kamailio modules for implementing presence
+ server and presence user agent for RICH presence, registrar-based presence,
+ external triggered presence and XCAP support.
+
+Package: kamailio-perl-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Perl extensions and database driver for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides an interface for Kamailio to write Perl extensions and
+ the perlvdb database driver for Kamailio.
+
+Package: kamailio-snmpstats-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}),
+         snmpd,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: SNMP AgentX subagent module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the snmpstats module for Kamailio. This module acts
+ as an AgentX subagent which connects to a master agent.
+
+Package: kamailio-xmpp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: XMPP gateway module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the SIP to XMPP IM translator module for Kamailio.
+
+Package: kamailio-xml-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Replaces: kamailio-xml-module, kamailio-xmlrpc-module
+Provides: kamailio-xmlrpc-modules
+Description: XML based extensions for Kamailio's Management Interface
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides:
+ - the XMLRPC transport implementations for Kamailio's
+ Management and Control Interface.
+ - xmlops module for XPath operations in configuration file
+
+Package: kamailio-carrierroute-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: carrierroute module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the carrierroute module for Kamailio, an integrated
+ solution for routing, balancing and blacklisting.
+
+Package: kamailio-berkeley-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: db5.1-util,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: Berkeley database module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the Berkeley database module for Kamailio, a
+ high-performance embedded DB kernel. All database tables are stored
+ in files, no additional server is necessary.
+
+Package: kamailio-berkeley-bin
+Architecture: linux-any
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Berkeley database module for Kamailio - helper program
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides helper modules for the Berkeley database module for
+ Kamailio, a high-performance embedded DB kernel. You should normally
+ install kamailio-berkeley-modules and not this package directly.
+
+Package: kamailio-ldap-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: LDAP modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ldap and h350 modules for Kamailio, enabling LDAP
+ queries from the Kamailio config and storage of SIP account data in an LDAP
+ directory.
+
+Package: kamailio-ims-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: IMS module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains various Diameter interfaces and modules for Kamailio
+ to run as an IMS core.
+
+Package: kamailio-utils-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Provides a set utility functions for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ Provides a set of utility functions for Kamailio, which are not related
+ to the server configuration.
+
+Package: kamailio-sctp-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: sctp module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the sctp module for Kamailio.
+
+Package: kamailio-java-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: gcj-jre,
+         kamailio (= ${binary:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: contains the app_java module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_java module, an extension allowing to
+ execute embedded Java applications within configuration file.
+
+Package: kamailio-tls-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: contains the TLS kamailio transport module
+ This has been split out of the main kamailio package, so that kamailio will
+ not depend on openssl. This module will enable you to use the TLS transport.
+
+Package: kamailio-outbound-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Outbound module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing SIP outbound extension.
+
+Package: kamailio-websocket-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: Websocket module for kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package contains the module implementing WebSocket transport layer.
+
+Package: kamailio-autheph-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: authentication using ephemeral credentials module for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the ephemeral module for Kamailio.
+
+Package: kamailio-extra-modules
+Architecture: linux-any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: kamailio (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: extra modules for Kamailio
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides: gzcompress
+
+Package: kamailio-nth
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: binutils,
+         bison,
+         bvi,
+         flex,
+         gcc,
+         gdb,
+         iftop,
+         lsof,
+         mc,
+         most,
+         ngrep,
+         psmisc,
+         screen,
+         sipsak,
+         tcpdump,
+         vim,
+         ${misc:Depends}
+Description: Kamailio - package for "nice to have" installation
+ This is a metapackage for easy installation various useful tools that may be
+ handy on server with Kamailio installed.
diff --git a/pkg/kamailio/deb/wheezy/copyright b/pkg/kamailio/deb/wheezy/copyright
new file mode 100644
index 0000000..ff31338
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/copyright
@@ -0,0 +1,335 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Kamailio
+Upstream-Contact: sr-dev at lists.sip-router.org
+Source: http://www.kamailio.org/pub/kamailio/
+
+Files: *
+Copyright:
+ 2001-2003 FhG Fokus
+ 2006-2010 iptelorg GmbH
+ Various others (see AUTHORS file)
+License: GPL-2.0+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2012, 2013, 2014 Victor Seva <linuxmaniac at torreviejawireless.org>
+           2009, 2010, 2011, Daniel-Constantin Mierla <miconda at gmail.com>
+           2010, Jon Bonilla <manwe at aholab.ehu.es>
+           2009, Jonas Bergler <jonas.bergler at staff.snap.net.nz>
+           2009, Henning Westerholt <henning.westerholt at 1und1.de>
+           2007, Julien BLACHE <jblache at debian.org>
+License: GPL-2+
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+Files: atomic/* atomic_ops.* basex.* bit_*.c char_msg_val.h compiler_opt.h
+ core_stats.h counters.* endianness.* futexlock.h hashes.h io_wait.*
+ kstats_types.h lib/kcore/kstats_wrapper.* lock_ops.c lock_ops_init.h
+ lvalue.* mem/ll_malloc.* mem/memdbg.h mem/sf_malloc.* mi/*.h mod_fix.*
+ modules/tm/rpc_uac.* modules/counters/counters.c modules/tls/sbufq.h
+ modules/tls/tls_bio.* modules/tls/tls_cfg.* modules/tls/tls_cfg.h
+ modules/tls/tls_ct_wrq.* modules/tls/tls_ct_q.h modules/tls/tls_domain.*
+ modules/tls/tls_server.h modules/tls/tls_locking.* modules/tls/tls_rpc.*
+ modules/tls/tls_server.c modules/malloc_test/malloc_test.c modules/blst/blst.c
+ parser/case_p_* parser/case_reas.h pvapi.h pv_core.* rand/fastrand.* raw_*
+ rpc_lookup.* rvalue.* sctp_* ser_time.h shm_init.* sip_msg_clone.* sock_ut.*
+ sr_compat.* str_hash.h switch.* tcp_ev.h tcp_int_send.h tcp_options.*
+ tcp_read.h tcp_stats.* timer_proc.* tls_hooks.* tls_hooks_init.h ver.*
+Copyright: 2006-2010 iptelorg GmbH
+License: ISC
+
+Files: modules/tls/tls_select.* modules/tls/tls_dump_vf.*
+Copyright: 2005-2010 iptelorg GmbH
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: modules/websocket/* modules/outbound/* modules/auth_ephemeral/*
+Copyright: 2012-2013 Crocodile RCS Ltd
+License: GPL-2 + OpenSSL exception
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+ * Exception: permission to copy, modify, propagate, and distribute a work
+ * formed by combining OpenSSL toolkit software and the code in this file,
+ * such as linking with software components and libraries released under
+ * OpenSSL project license.
+
+Files: daemonize.* fastlock.h lock_ops.h mem/mem.* mem/f_malloc.h
+ mem/meminfo.h mem/memtest.c mem/shm_mem.c mem/q_malloc.h mem/q_malloc.c
+ mem/shm_mem.h mem/f_malloc.c modules/tls/tls_rpc.c modules/tls/tls_server.c
+ modules/tls/tls_domain.c modules/tls/tls_domain.h modules/tls/tls_server.h
+ modules/tls/tls_rpc.h pt.c pt.h sched_yield.h ut.c ut.h
+Copyright: 2001-2003 FhG Fokus
+License: ISC
+
+Files: events.* modules/topoh/*
+Copyright: 2009 SIP-Router.org
+License: ISC
+
+Files: modules/mi_rpc/mi_rpc_mod.c modules/pv/pv_xavp.*
+ modules/usrloc/ul_rpc.* ppcfg.* xavp.*
+Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com)
+License: ISC
+
+Files: obsolete/jabber_k/tree234.*
+Copyright: 1999, 2000, 2001, Simon Tatham
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: modules/xmpp/xsnprintf.c obsolete/jabber_s/xsnprintf.c obsolete/jabber_k/xsnprintf.c
+Copyright: 1995-1998, The Apache Group
+License: Apache-1.0
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ 4. The names "Apache Server" and "Apache Group" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission.
+ .
+ 5. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the Apache Group
+    for use in the Apache HTTP server project (http://www.apache.org/)."
+ .
+ THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: modules/mi_xmlrpc/abyss*
+Copyright: 2000, Moez Mahfoudh <mmoez at bigfoot.com>
+License: BSD-3-clause
+
+Files: list.h
+Copyright: 1991, 1993 The Regents of the University of California
+License: BSD-3-clause
+
+Files: modules/tm/t_serial.*
+Copyright: 2008 Juha Heinanen
+License: BSD-2-clause
+
+Files: parser/sdp/sdp.* parser/sdp/sdp_helpr_funcs.* parser/sdp/sdp_cloner.h
+Copyright:
+ 2008-2009 SOMA Networks, INC.
+ 2010 VoIP Embedded, Inc
+License: BSD-2-clause
+
+Files: modules/tls/fixed_c_zlib.h
+Copyright:1998-2005 The OpenSSL Project
+Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that
+ this code will not build by default in the Debian packaging.
+License: OpenSSL
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. All advertising materials mentioning features or use of this
+    software must display the following acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ .
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+    endorse or promote products derived from this software without
+    prior written permission. For written permission, please contact
+    openssl-core at openssl.org.
+ .
+ 5. Products derived from this software may not be called "OpenSSL"
+    nor may "OpenSSL" appear in their names without prior written
+    permission of the OpenSSL Project.
+ .
+ 6. Redistributions of any form whatsoever must retain the following
+    acknowledgment:
+    "This product includes software developed by the OpenSSL Project
+    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ .
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: md5.* md5utils.c
+Copyright: 1991-2, RSA Data Security, Inc
+Comment: Note that md5.c and md5.h have been replaced in the patches
+ plum_md5*.patch .
+ .
+ As for md5utils.c, according to a mail from Upstream (Daniel-Constantin
+ Mierla): while the initial commit log for it states that it is derived
+ from mddriver.c of RFC 1321, it seems that it was, in fact, written from
+ scratch by Jiri Kuthan (a core developer of SER at that time, working for
+ FhG Fokus Institute). As you can see it's rather trivial and uses a data
+ type of SER ("str").  I didn't reimplement it as it's too trivial and
+ looks like there's no other way to implement it.
+License: RSA-MD5
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+ .
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+ .
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+ .
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+
+Files: mem/dl_*
+Copyright: n/a
+License: public-domain
+ This is a version (aka dlmalloc) of malloc/free/realloc written by
+ Doug Lea and released to the public domain, as explained at
+ http://creativecommons.org/licenses/publicdomain.  Send questions,
+ comments, complaints, performance data, etc to dl at cs.oswego.edu
+
+Files: rand/isaac/*
+Copyright: n/a
+License: public-domain
+ By Bob Jenkins.  My random number generator, ISAAC.  Public Domain.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files: lib/srutils/srjson.*
+Copyright: 2009 Dave Gamble
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ ,
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+  1. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/kamailio/deb/wheezy/kamailio-autheph-modules.lintian-overrides b/pkg/kamailio/deb/wheezy/kamailio-autheph-modules.lintian-overrides
new file mode 100644
index 0000000..dcb3d18
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio-autheph-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-autheph-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/wheezy/kamailio-berkeley-bin.dirs b/pkg/kamailio/deb/wheezy/kamailio-berkeley-bin.dirs
new file mode 100644
index 0000000..236670a
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio-berkeley-bin.dirs
@@ -0,0 +1 @@
+usr/sbin
diff --git a/pkg/kamailio/deb/wheezy/kamailio-dnssec-modules.lintian-overrides b/pkg/kamailio/deb/wheezy/kamailio-dnssec-modules.lintian-overrides
new file mode 100644
index 0000000..10165fe
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio-dnssec-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-dnssec-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/wheezy/kamailio-outbound-modules.lintian-overrides b/pkg/kamailio/deb/wheezy/kamailio-outbound-modules.lintian-overrides
new file mode 100644
index 0000000..3050cfe
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio-outbound-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-outbound-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/wheezy/kamailio-tls-modules.lintian-overrides b/pkg/kamailio/deb/wheezy/kamailio-tls-modules.lintian-overrides
new file mode 100644
index 0000000..bbe0d37
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio-tls-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-tls-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/wheezy/kamailio-websocket-modules.lintian-overrides b/pkg/kamailio/deb/wheezy/kamailio-websocket-modules.lintian-overrides
new file mode 100644
index 0000000..8f384fb
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio-websocket-modules.lintian-overrides
@@ -0,0 +1 @@
+kamailio-websocket-modules binary: possible-gpl-code-linked-with-openssl
diff --git a/pkg/kamailio/deb/wheezy/kamailio.README.Debian b/pkg/kamailio/deb/wheezy/kamailio.README.Debian
new file mode 100644
index 0000000..d25769a
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio.README.Debian
@@ -0,0 +1,39 @@
+Kamailio for Debian
+-------------------
+
+* init script check for fork=no
+-------------------------------
+
+The Kamailio init script will not start Kamailio on boot if fork=no is
+specified in the config file. The check in the initscript will match
+any occurrence of fork=no in the file, even inside C-style comments.
+
+You can disable this check in the init script if you wish; just comment
+out the calls to the check_fork function in the script. Your changes to
+the init script will be preserved upon upgrade, as the file is tagged
+as a conffile.
+
+
+* Kamailio setup
+----------------
+
+To setup Kamailio, you need to:
+ - configure Kamailio properly to suit your needs
+ - edit /etc/default/kamailio, adjust the MEMORY parameter and set
+   RUN_KAMAILIO to "yes"
+
+If you are building an HA cluster using heartbeat or similar, you'll want
+to disable the init script by running:
+
+  update-rc.d kamailio remove
+
+so that Kamailio will not be launched at system startup. You still need
+to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init
+script.
+
+Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to
+get a core dump in case Kamailio crashes. The debug symbols for Kamailio are
+provided by the kamailio-dbg package.
+
+
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Wed, 11 Dec 2013 16:07:11 +0100
diff --git a/pkg/kamailio/deb/wheezy/kamailio.default b/pkg/kamailio/deb/wheezy/kamailio.default
new file mode 100644
index 0000000..0cfc8c8
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio.default
@@ -0,0 +1,28 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+#RUN_KAMAILIO=yes
+
+# User to run as
+#USER=kamailio
+
+# Group to run as
+#GROUP=kamailio
+
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+#SHM_MEMORY=64
+#PKG_MEMORY=4
+
+# Config file
+#CFGFILE=/etc/kamailio/kamailio.cfg
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable Kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems it is necessary to specify a directory for the core files
+# to get a dump. Look into the kamailio init file for an example configuration.
+#DUMP_CORE=yes
diff --git a/pkg/kamailio/deb/wheezy/kamailio.examples b/pkg/kamailio/deb/wheezy/kamailio.examples
new file mode 100644
index 0000000..c48447a
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio.examples
@@ -0,0 +1,2 @@
+examples/*
+
diff --git a/pkg/kamailio/deb/wheezy/kamailio.init b/pkg/kamailio/deb/wheezy/kamailio.init
new file mode 100644
index 0000000..d4801d2
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio.init
@@ -0,0 +1,162 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          kamailio
+# Required-Start:    $syslog $network $local_fs $remote_fs $time
+# Should-Start:      $named slapd mysql postgresql snmpd radiusd
+# Should-Stop:       $named slapd mysql postgresql snmpd radiusd
+# Required-Stop:     $syslog $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start the Kamailio SIP proxy server
+# Description:       Start the Kamailio SIP proxy server
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/kamailio
+NAME=kamailio
+DESC="Kamailio SIP server"
+HOMEDIR=/var/run/kamailio
+PIDFILE=$HOMEDIR/$NAME.pid
+DEFAULTS=/etc/default/kamailio
+CFGFILE=/etc/kamailio/kamailio.cfg
+RUN_KAMAILIO=no
+USER=kamailio
+GROUP=kamailio
+# Amount of shared and private memory to allocate
+# for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+PKG_MEMORY=4
+DUMP_CORE=no
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then
+	log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+	exit 0
+    fi
+}
+
+check_kamailio_config ()
+{
+	# Check if kamailio configuration is valid before starting the server
+	set +e
+	out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null)
+	retcode=$?
+	set -e
+	if [ "$retcode" != '0' ]; then
+	    log_failure_msg "Not starting $DESC: invalid configuration file!"
+	    log_failure_msg
+	    log_failure_msg "$out"
+	    log_failure_msg
+	    exit 1
+	fi
+}
+
+create_radius_seqfile ()
+{
+    # Create a radius sequence file to be used by the radius client if
+    # radius accounting is enabled. This is needed to avoid any issue
+    # with the file not being writable if kamailio first starts as user
+    # root because DUMP_CORE is enabled and creates this file as user
+    # root and then later it switches back to user kamailio and cannot
+    # write to the file. If the file exists before kamailio starts, it
+    # won't change it's ownership and will be writable for both root
+    # and kamailio, no matter what options are chosen at install time
+    RADIUS_SEQ_FILE=/var/run/kamailio/kamailio_radius.seq
+    if [ -d /var/run/kamailio ]; then
+	chown ${USER}:${GROUP} /var/run/kamailio
+
+	if [ ! -f $RADIUS_SEQ_FILE ]; then
+	    touch $RADIUS_SEQ_FILE
+	fi
+
+	chown ${USER}:${GROUP} $RADIUS_SEQ_FILE
+	chmod 660 $RADIUS_SEQ_FILE
+    fi
+}
+
+test -f $DAEMON || exit 0
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    log_failure_msg "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+set -e
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+# /var/run can be a tmpfs
+if [ ! -d $HOMEDIR ]; then
+    mkdir -p $HOMEDIR
+fi
+
+OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP"
+
+case "$1" in
+  start|debug)
+	check_kamailio_config
+	create_radius_seqfile
+
+	if [ "$1" != "debug" ]; then
+	    check_fork
+	fi
+
+	log_daemon_msg "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS || log_failure_msg " already running"
+	log_end_msg 0
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+	log_end_msg 0
+	;;
+  restart|force-reload)
+	check_kamailio_config
+	create_radius_seqfile
+
+	$0 stop
+	sleep 1
+	$0 start
+	;;
+  status)
+	log_daemon_msg "Status of $DESC: "
+
+	status_of_proc -p"$PIDFILE" $NAME $NAME
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/pkg/kamailio/deb/wheezy/kamailio.lintian-overrides b/pkg/kamailio/deb/wheezy/kamailio.lintian-overrides
new file mode 100644
index 0000000..18152ed
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio.lintian-overrides
@@ -0,0 +1,2 @@
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge.cfg #!KAMAILIO
+kamailio binary: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/registrar.cfg #!KAMAILIO
diff --git a/pkg/kamailio/deb/wheezy/kamailio.postinst b/pkg/kamailio/deb/wheezy/kamailio.postinst
new file mode 100644
index 0000000..4ee38ec
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/kamailio.postinst
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        adduser --quiet --system --group --disabled-password \
+                --shell /bin/false --gecos "Kamailio SIP Server" \
+                --home /var/run/kamailio kamailio || true
+
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
diff --git a/pkg/kamailio/deb/wheezy/rules b/pkg/kamailio/deb/wheezy/rules
new file mode 100755
index 0000000..7b7ab3c
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/rules
@@ -0,0 +1,220 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
+
+FILENAME := kamailio_$(UPVERSION).orig.tar.gz
+URL := http://www.kamailio.org/pub/kamailio/$(UPVERSION)/src/kamailio-$(UPVERSION)_src.tar.gz
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# java stuff using libgcj12
+export JAVA_HOME=/usr/lib/jvm/java-gcj-4.6
+
+# choose freeradius
+
+# modules not in the "main" kamailio package
+EXCLUDED_MODULES=
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main kamailio package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=bdb dbtext oracle pa iptrtpproxy purple mi_xmlrpc dnssec
+
+# module groups that are packaged in seperate packages
+# (with the name kamailio-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
+			   ldap xml perl utils lua memcached \
+			   snmpstats carrierroute xmpp cpl redis python geoip\
+			   sqlite json mono ims sctp java \
+			   tls outbound websocket autheph 
+
+# module groups to be packaged onto kamailio-extra-modules
+EXTRA_GROUPS=gzcompress
+
+# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
+LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/kamailio/usr/$(LIBDIR)/kamailio \
+			$(CURDIR)/debian/kamailio-db-modules/usr/$(LIBDIR)/kamailio
+
+# "function" to get package short name out of a dir/module_name
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS EXTRA_GROUPS),\
+		$(MAKE) every-module group_include="k$(grp)"
+	)
+endef
+
+
+define PACKAGE_GRP_INSTALL_template
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-$(grp)-modules \
+		doc-dir=share/doc/kamailio-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio" &&\
+			for r in `find $$d -name 'lib*'|xargs`; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/kamailio-$(grp)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+			done ; \
+		done
+		find $(CURDIR)/debian/kamailio-$(grp)-modules -depth -empty -type d -exec rmdir {} \;
+	)
+endef
+
+define PACKAGE_EXTRA_INSTALL_template
+	$(foreach grp,$(EXTRA_GROUPS),\
+		$(MAKE) install-modules-all LIBDIR=$(LIBDIR) group_include="k$(grp)" \
+		basedir=$(CURDIR)/debian/kamailio-extra-modules \
+		cfg_prefix=$(CURDIR)/debian/kamailio-extra-modules \
+		doc-dir=share/doc/kamailio-extra-modules
+	)
+	# eliminate duplicate libs
+	-for d in $(DUP_LIBS_DIRS); do \
+		test "$$d" != "$(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio" &&\
+		for r in `find $$d -name 'lib*'|xargs`; do \
+			echo "removing extra lib `basename $$r` present also in $$d";\
+			rm -f $(CURDIR)/debian/kamailio-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"` ; \
+		done ; \
+	done
+	find $(CURDIR)/debian/kamailio-extra-modules -depth -empty -type d -exec rmdir {} \;
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
+# LDFLAGS -> LD_EXTRA_OPTS
+CUSTOM_BUILDFLAGS:=$(shell dpkg-buildflags --export=configure| \
+sed -e 's/" CPPFLAGS="/ /' -e 's/CFLAGS/CC_EXTRA_OPTS/g' -e 's/LDFLAGS/LD_EXTRA_OPTS/g')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	$(MAKE) FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/kamailio \
+			cfg_target=/etc/kamailio/ \
+			basedir=$(CURDIR)/debian/kamailio \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			$(CUSTOM_BUILDFLAGS) \
+			group_include="kstandard"
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# Add here commands to clean up after the build process.
+	$(MAKE) maintainer-clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	# Add here commands to install the package into debian/kamailio
+	$(MAKE) install LIBDIR=$(LIBDIR) group_include="kstandard"
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	$(call PACKAGE_EXTRA_INSTALL_template)
+	mv $(CURDIR)/debian/kamailio-berkeley-modules/usr/sbin/kambdb_recover \
+		$(CURDIR)/debian/kamailio-berkeley-bin/usr/sbin/kambdb_recover
+	# install /etc/default/kamailio file
+	mkdir -p $(CURDIR)/debian/kamailio/etc/default
+	cp -f debian/kamailio.default $(CURDIR)/debian/kamailio/etc/default/kamailio
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installinit -pkamailio -- defaults 23
+	dh_installcron
+	dh_installman
+	dh_installinfo
+	dh_lintian
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip --dbg-package=kamailio-dbg
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-independent packages using the common target
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+# We have nothing to do by default.
+
+
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
+	@@echo Downloading $(FILENAME) from $(URL) ...
+	@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
diff --git a/pkg/kamailio/deb/wheezy/source.lintian-overrides b/pkg/kamailio/deb/wheezy/source.lintian-overrides
new file mode 100644
index 0000000..620d9ff
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/source.lintian-overrides
@@ -0,0 +1 @@
+kamailio source: debian-watch-file-in-native-package
diff --git a/pkg/kamailio/deb/wheezy/source/format b/pkg/kamailio/deb/wheezy/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/pkg/kamailio/deb/wheezy/watch b/pkg/kamailio/deb/wheezy/watch
new file mode 100644
index 0000000..c50f31f
--- /dev/null
+++ b/pkg/kamailio/deb/wheezy/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\~svn([\d]+)//; \
+http://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz
diff --git a/pkg/kamailio/fedora/17/README b/pkg/kamailio/fedora/17/README
new file mode 100644
index 0000000..b3f5b2d
--- /dev/null
+++ b/pkg/kamailio/fedora/17/README
@@ -0,0 +1,67 @@
+Building Kamailio RPMs for Enterprise Linux and Fedora
+------------------------------------------------------
+
+This is a simple process:
+1) Create a clean appliance using BoxGrinder (always worth doing as it makes
+   sure your build appliance contains only standard versions of packages and
+   has all updates applied).
+2) Start the appliance and log in.
+3) Prepare the appliance for RPM builds
+4) Either:
+   a) Checkout the version of Kamailio you want to build from GIT (instructions
+      available on the Kamailio wiki at http://www.kamailio.org/wiki) and
+      create a release tar file, or
+   b) Download a release tar file from http://www.kamailio.org/pub/kamailio and
+      extract the correct kamailio.spec file from it
+5) Run "rpmbuild" to create the RPMs
+
+If you don't have BoxGrinder installed (http://boxgrinder.org/) you can do so in
+Fedora using the command:
+
+   # [sudo] yum install rubygem-boxgrinder-build
+
+Note: The host operating system you install BoxGrinder on does not have to be
+      same operating system flavour, architecture, or version as the appliance
+      you are creating.  It is entirely sensible to use an x86_64 Fedora host to
+      build an i386 CentOS appliance and i386 CentOS Kamailio RPMs.
+
+Example: Building Kamailio 3.4.x (master) x86_64 binary RPMs from GIT for
+         Fedora 17.
+
+This example assumes:
+- You have Internet connectivity
+- You have BoxGrinder, and libvirtd (and any management software required for
+  it) installed locally.
+- You have obtained the kamailio-build.appl file from pkg/kamailio/fedora/17
+  (either by download from http://git.sip-router.org/ or from a local
+  checkout of the code)
+- Your host operating system is x86_64.
+
+If you want to build a different version of Kamailio, a different set of RPMs
+(different rpmbuild options), or install and run the appliance on a remote
+(or different type of virtual) machine you should only need to make small
+changes to the commands in this example.
+
+1) Create a clean Fedora 17 x86_64 appliance using BoxGrinder:
+   # mkdir appliance
+   # cd appliance
+   # [sudo] boxgrinder-build \
+       [path to]/pkg/kamailio/fedora/17/kamailio-build.appl -d libvirt \
+       --delivery-config connection_uri:qemu:///system,\
+       image_delivery_uri:/var/lib/libvirt/images,overwrite:true,\
+       domain_type:kvm
+2) Start the appliance and log in:
+   - I prefer to use virt-manager for this.  The default username and password
+     for the appliance is "root" and "kamailio" respectively.
+3) Prepare the appliance for RPM builds:
+   # mkdir -p rpmbuild/SOURCES
+4) Checkout Kamailio 3.4.x (master) and create a release tar file:
+   # git clone --depth 1 git://git.sip-router.org/sip-router kamailio
+   # cd kamailio
+    Note: if not building master you want to do a "git checkout" after this
+   # git archive --output ../rpmbuild/SOURCES/kamailio-3.4.0_src.tar.gz \
+       --prefix=kamailio-3.4.0/ master
+5) Run "rpmbuild" to create the binary RPMs:
+   # rpmbuild -bb pkg/kamailio/fedora/17/kamailio.spec
+
+Once the build is complete the RPMs will be in ~/rpmbuild/RPMS/x86_64.
diff --git a/pkg/kamailio/fedora/17/kamailio-build.appl b/pkg/kamailio/fedora/17/kamailio-build.appl
new file mode 100644
index 0000000..e841b53
--- /dev/null
+++ b/pkg/kamailio/fedora/17/kamailio-build.appl
@@ -0,0 +1,49 @@
+name: "kamailio-build-fc17-#BASE_ARCH#"
+summary: "Fedora 17 image for building Kamailio #BASE_ARCH# RPMs"
+os:
+  name: fedora
+  version: 17
+  password: kamailio
+hardware:
+  memory: 1024
+  partitions:
+    "/":
+      size: 6
+packages:
+  - @core
+  - @base
+  - bison			# kamailio
+  - db4-devel			# kamailio-bdb
+  - docbook2X
+  - expat-devel			# kamailio-xmpp
+  - flex			# kamailio
+  - GeoIP-devel			# kamailio-GeoIP
+  - gcc
+  - git
+  - glib-devel			# kamailio-purple
+  - hiredis-devel		# kamailio-redis
+  - json-c-devel		# kamailio-json
+  - libconfuse-devel		# kamailio-carrierroute
+  - libcurl-devel		# kamailio-utils, kamailio-presence
+  - libevent-devel		# kamailio-json
+  - libpurple-devel		# kamailio-purple
+  - libunistring-devel		# kamailio-websocket
+  - libxml2-devel		# kamailio-cdp, kamailio-cpl, kamailio-ims, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xhttp-pi, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools-devel		# kamailio
+  - lua-devel			# kamailio-lua
+  - make			# kamailio
+  - mod_perl-devel		# kamailio-perl
+  - mono-devel			# kamailio-mono
+  - mysql-devel			# kamailio-mysql
+  - net-snmp-devel		# kamailio-snmpstats
+  - openldap-devel		# kamailio-ldap
+  - openssl-devel		# kamailio
+  - pcre-devel			# kamailio-regex, kamailio-dialplan, kamailio-lcr
+  - postgresql-devel		# kamailio-postgresql
+  - python-devel		# kamailio-python
+  - radiusclient-ng-devel	# kamailio-radius
+  - redhat-rpm-config		# kamailio-debuginfo
+  - rpm-build
+  - sqlite-devel		# kamailio-sqlite
+  - unixODBC-devel		# kamailio-unixODBC
+  - zlib-devel			# kamailio-mysql
diff --git a/pkg/kamailio/fedora/17/kamailio.appl b/pkg/kamailio/fedora/17/kamailio.appl
new file mode 100644
index 0000000..7e37812
--- /dev/null
+++ b/pkg/kamailio/fedora/17/kamailio.appl
@@ -0,0 +1,42 @@
+name: "kamailio-fc17-#BASE_ARCH#"
+summary: "Fedora 17 image for installing Kamailio #BASE_ARCH# RPMs"
+os:
+  name: fedora
+  version: 17
+  password: kamailio
+hardware:
+  memory: 1024
+  partitions:
+    "/":
+      size: 2
+packages:
+  - @core
+  - @base
+  - db4				# kamailio-bdb
+  - expat			# kamailio-xmpp
+  - GeoIP			# kamailio-GeoIP
+  - glib			# kamailio-purple
+  - hiredis			# kamailio-redis
+  - json-c			# kamailio-json
+  - libconfuse			# kamailio-carrierroute
+  - libcurl			# kamailio-utils, kamailio-presence
+  - libevent			# kamailio-json
+  - libpurple			# kamailio-purple
+  - libunistring		# kamailio-websocket
+  - libxml2			# kamailio-cdp, kamailio-cpl, kamailio-ims, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xhttp-pi, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools		# kamailio
+  - mod_perl			# kamailio-perl
+  - mono-core			# kamailio-mono
+  - mysql-libs			# kamailio-mysql
+  - net-snmp-libs		# kamailio-snmpstats
+  - openldap			# kamailio-ldap
+  - openssl			# kamailio
+  - pcre			# kamailio-regex, kamailio-dialplan, kamailio-lcr
+  - perl-Authen-SASL		# kamailio-perl
+  - perl-LDAP			# kamailio-perl
+  - postgresql-libs		# kamailio-postgresql
+  - python			# kamailio-python
+  - radiusclient-ng		# kamailio-radius
+  - sqlite			# kamailio-sqlite
+  - unixODBC			# kamailio-unixODBC
+  - zlib			# kamailio-mysql
diff --git a/pkg/kamailio/fedora/17/kamailio.service b/pkg/kamailio/fedora/17/kamailio.service
new file mode 100644
index 0000000..a8d59b0
--- /dev/null
+++ b/pkg/kamailio/fedora/17/kamailio.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Kamailio (OpenSER) - the Open Source SIP Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/sysconfig/kamailio
+PIDFile=/var/run/kamailio.pid
+ExecStart=/usr/sbin/kamailio -P /var/run/kamailio.pid $OPTIONS
+ExecStopPost=/usr/bin/rm -f /var/run/kamailio.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pkg/kamailio/fedora/17/kamailio.spec b/pkg/kamailio/fedora/17/kamailio.spec
new file mode 100644
index 0000000..bed78d5
--- /dev/null
+++ b/pkg/kamailio/fedora/17/kamailio.spec
@@ -0,0 +1,1328 @@
+%define name	kamailio
+%define ver	4.1.4
+%define rel	0%{dist}
+
+
+
+Summary:	Kamailio (former OpenSER) - the Open Source SIP Server
+Name:		%name
+Version:	%ver
+Release:	%rel
+Packager:	Peter Dunkley <peter at dunkley.me.uk>
+License:	GPL
+Group:		System Environment/Daemons
+Source:		http://kamailio.org/pub/kamailio/%{ver}/src/%{name}-%{ver}_src.tar.gz
+URL:		http://kamailio.org/
+Vendor:		kamailio.org
+BuildRoot:	%{_tmppath}/%{name}-%{ver}-buildroot
+Conflicts:	kamailio-auth-ephemeral < %ver, kamailio-auth-identity < %ver
+Conflicts:	kamailio-bdb < %ver, kamailio-cdp < %ver, kamailio-cdp < %ver
+Conflicts:	kamailio-dialplan < %ver, kamailio-ims < %ver
+Conflicts:	kamailio-lcr < %ver, kamailio-ldap < %ver, kamailio-lua < %ver
+Conflicts:	kamailio-mysql < %ver, kamailio-outbound < %ver
+Conflicts:	kamailio-perl < %ver, kamailio-postgresql < %ver
+Conflicts:	kamailio-presence < %ver, kamailio-purple < %ver
+Conflicts:	kamailio-python < %ver, kamailio-regex < %ver
+Conflicts:	kamailio-sctp < %ver, kamailio-snmpstats < %ver
+Conflicts:	kamailio-sqlite < %ver, kamailio-stun < %ver
+Conflicts:	kamailio-tls < %ver, kamailio-unixODBC < %ver
+Conflicts:	kamailio-utils < %ver, kamailio-websocket < %ver
+Conflicts:	kamailio-xhttp-pi < %ver, kamailio-xmlops < %ver
+Conflicts:	kamailio-xmlrpc < %ver, kamailio-xmpp < %ver
+%if 0%{?fedora}
+Conflicts:	kamailio-carrierroute < %ver, kamailio-GeoIP < %ver
+Conflicts:	kamailio-json < %ver, kamailio-mono < %ver
+Conflicts: 	kamailio-radius < %ver, kamailio-redis < %ver
+%endif
+BuildRequires:	bison, flex, gcc, make, redhat-rpm-config
+%if 0%{?fedora}
+BuildRequires:	docbook2X
+%endif
+
+%description
+Kamailio (former OpenSER) is an Open Source SIP Server released under GPL, able
+to handle thousands of call setups per second. Among features: asynchronous TCP,
+UDP and SCTP, secure communication via TLS for VoIP (voice, video); IPv4 and
+IPv6; SIMPLE instant messaging and presence with embedded XCAP server and MSRP
+relay; ENUM; DID and least cost routing; load balancing; routing fail-over;
+accounting, authentication and authorization; support for many backend systems
+such as MySQL, Postgres, Oracle, Radius, LDAP, Redis, Cassandra; XMLRPC control
+interface, SNMP monitoring. It can be used to build large VoIP servicing
+platforms or to scale up SIP-to-PSTN gateways, PBX systems or media servers
+like Asterisk™, FreeSWITCH™ or SEMS.
+
+
+%package	auth-ephemeral
+Summary:	Functions for authentication using ephemeral credentials.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description auth-ephemeral
+Functions for authentication using ephemeral credentials.
+
+
+%package	auth-identity
+Summary:	Functions for secure identification of originators of SIP messages for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libcurl, openssl, kamailio = %ver
+BuildRequires:	libcurl-devel, openssl-devel
+
+%description auth-identity
+Functions for secure identification of originators of SIP messages for Kamailio.
+
+
+%package	bdb
+Summary:	Berkeley database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	db4, kamailio = %ver
+BuildRequires:	db4-devel
+
+%description	bdb
+Berkeley database connectivity for Kamailio.
+
+
+%package	cdp
+Summary:	C Diameter Peer module and extensions module for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	cdp
+C Diameter Peer module and extensions module for Kamailio.
+
+
+%package	cpl
+Summary:	CPL (Call Processing Language) interpreter for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	cpl
+CPL (Call Processing Language) interpreter for Kamailio.
+
+
+%package	dialplan
+Summary:	String translations based on rules for Kamailio.
+Group:		System Environment/Daemons
+Requires:	pcre, kamailio = %ver
+BuildRequires:	pcre-devel
+
+%description	dialplan
+String translations based on rules for Kamailio.
+
+
+%package	ims
+Summary:	IMS modules and extensions module for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver, kamailio-cdp = %ver
+BuildRequires:	libxml2-devel
+
+%description	ims
+IMS modules and extensions module for Kamailio.
+
+
+%package	lcr
+Summary:	Least cost routing for Kamailio.
+Group:		System Environment/Daemons
+Requires:	pcre, kamailio = %ver
+BuildRequires:	pcre-devel
+
+%description	lcr
+Least cost routing for Kamailio.
+
+
+%package	ldap
+Summary:	LDAP search interface for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openldap, kamailio = %ver
+BuildRequires:	openldap-devel
+
+%description	ldap
+LDAP search interface for Kamailio.
+
+
+%package	lua
+Summary:	Lua extensions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	kamailio = %ver
+BuildRequires:	lua-devel
+
+%description	lua
+Lua extensions for Kamailio.
+
+
+%package	mysql
+Summary:	MySQL database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	mysql-libs, kamailio = %ver
+BuildRequires:	mysql-devel zlib-devel
+
+%description	mysql
+MySQL database connectivity for Kamailio.
+
+
+%package	outbound
+Summary:	Outbound (RFC 5626) support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description	outbound
+RFC 5626, "Managing Client-Initiated Connections in the Session Initiation
+Protocol (SIP)" support for Kamailio.
+
+
+%package	perl
+Summary:	Perl extensions and database driver for Kamailio.
+Group:		System Environment/Daemons 
+Requires:	mod_perl, kamailio = %ver
+BuildRequires:	mod_perl-devel
+
+%description	perl
+Perl extensions and database driver for Kamailio.
+
+
+%package	postgresql
+Summary:	PostgreSQL database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	postgresql-libs, kamailio = %ver
+BuildRequires:	postgresql-devel
+
+%description	postgresql
+PostgreSQL database connectivity for Kamailio.
+
+
+%package	presence
+Summary:	SIP Presence (and RLS, XCAP, etc) support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, libcurl, kamailio = %ver, kamailio-xmpp = %ver
+BuildRequires:	libxml2-devel, libcurl-devel
+
+%description	presence
+SIP Presence (and RLS, XCAP, etc) support for Kamailio.
+
+
+%package	purple
+Summary:	Multi-protocol IM and presence gateway module.
+Group:		System Environment/Daemons
+%if 0%{?fedora}
+Requires:	glib, libpurple, libxml2, kamailio = %ver
+Requires:	kamailio-presence = %ver
+BuildRequires:	glib-devel, libpurple-devel, libxml2-devel
+%else
+Requires:	glib2, libpurple, libxml2, kamailio = %ver
+Requires:	kamailio-presence = %ver
+BuildRequires:	glib2-devel, libpurple-devel, libxml2-devel
+%endif
+
+%description	purple
+Multi-protocol IM and presence gateway module.
+
+
+%package	python
+Summary:	Python extensions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	python, kamailio = %ver
+BuildRequires:	python-devel
+
+%description	python
+Python extensions for Kamailio.
+
+
+%package	regex
+Summary:	PCRE mtaching operations for Kamailio.
+Group:		System Environment/Daemons
+Requires:	pcre, kamailio = %ver
+BuildRequires:	pcre-devel
+
+%description	regex
+PCRE mtaching operations for Kamailio.
+
+
+%package	sctp
+Summary:	SCTP transport for Kamailio.
+Group:		System Environment/Daemons
+Requires:	lksctp-tools, kamailio = %ver
+BuildRequires:	lksctp-tools-devel
+
+%description	sctp
+SCTP transport for Kamailio.
+
+
+%package	snmpstats
+Summary:	SNMP management interface (scalar statistics) for Kamailio.
+Group:		System Environment/Daemons
+%if 0%{?fedora}
+Requires:	net-snmp-agent-libs, kamailio = %ver
+%else
+Requires:	net-snmp-libs, kamailio = %ver
+%endif
+BuildRequires:	net-snmp-devel
+
+%description	snmpstats
+SNMP management interface (scalar statistics) for Kamailio.
+
+
+%package	sqlite
+Summary:	SQLite database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	sqlite, kamailio = %ver
+BuildRequires:	sqlite-devel
+
+%description	sqlite
+SQLite database connectivity for Kamailio.
+
+
+%package	stun
+Summary:	Limited STUN (RFC 5389) support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description	stun
+Limited RFC 5389, "Session Traversal Utilities for NAT (STUN)" support for
+Kamailio.
+
+
+%package	tls
+Summary:	TLS transport for Kamailio.
+Group:		System Environment/Daemons
+Requires:	openssl, kamailio = %ver
+BuildRequires:	openssl-devel
+
+%description	tls
+TLS transport for Kamailio.
+
+
+%package	unixODBC
+Summary:	unixODBC database connectivity for Kamailio.
+Group:		System Environment/Daemons
+Requires:	unixODBC, kamailio = %ver
+BuildRequires:	unixODBC-devel
+
+%description	unixODBC
+unixODBC database connectivity for Kamailio.
+
+
+%package	utils
+Summary:	Non-SIP utitility functions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libcurl, libxml2, kamailio = %ver
+BuildRequires:	libcurl-devel, libxml2-devel
+
+%description	utils
+Non-SIP utitility functions for Kamailio.
+
+
+%package	websocket
+Summary:	WebSocket transport for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libunistring, openssl, kamailio = %ver
+BuildRequires:	libunistring-devel, openssl-devel
+
+%description	websocket
+WebSocket transport for Kamailio.
+
+
+%package	xhttp-pi
+Summary:	Web-provisioning interface for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	xhttp-pi
+Web-provisioning interface for Kamailio.
+
+
+%package	xmlops
+Summary:	XML operation functions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	xmlops
+XML operation functions for Kamailio.
+
+
+%package	xmlrpc
+Summary:	XMLRPC trasnport and encoding for Kamailio RPCs.
+Group:		System Environment/Daemons
+Requires:	libxml2, kamailio = %ver
+BuildRequires:	libxml2-devel
+
+%description	xmlrpc
+XMLRPC trasnport and encoding for Kamailio RPCs.
+
+
+%package	xmpp
+Summary:	SIP/XMPP IM gateway for Kamailio.
+Group:		System Environment/Daemons
+Requires:	expat, kamailio = %ver
+BuildRequires:	expat-devel
+
+%description	xmpp
+SIP/XMPP IM gateway for Kamailio.
+
+
+%if 0%{?fedora}
+%package	carrierroute
+Summary:	Routing, balancing, and blacklisting for Kamailio.
+Group:		System Environment/Daemons
+Requires:	libconfuse, kamailio = %ver
+BuildRequires:	libconfuse-devel
+
+%description	carrierroute
+Routing, balancing, and blacklisting for Kamailio.
+
+
+%package	GeoIP
+Summary:	Max Mind GeoIP real-time query support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	GeoIP, kamailio = %ver
+BuildRequires:	GeoIP-devel
+
+%description	GeoIP
+Max Mind GeoIP real-time query support for Kamailio.
+
+
+%package	json
+Summary:	json string operation and rpc support for Kamailio.
+Group:		System Environment/Daemons
+Requires:	json-c, libevent, kamailio = %ver
+BuildRequires:	json-c-devel, libevent-devel
+
+%description	json
+json string operation and rpc support for Kamailio.
+
+
+%package	mono
+Summary:	Mono extensions for Kamailio.
+Group:		System Environment/Daemons
+Requires:	mono-core, kamailio = %ver
+BuildRequires:	mono-devel
+
+%description	mono
+Mono extensions for Kamailio.
+
+
+%package	radius
+Summary:	Radius AAA API for Kamailio.
+Group:		System Environment/Daemons
+Requires:	radiusclient-ng, kamailio = %ver
+BuildRequires:	radiusclient-ng-devel
+
+%description	radius
+Radius AAA API for Kamailio.
+
+
+%package	redis
+Summary:	REDIS NoSQL database connector for Kamailio.
+Group:		System Environment/Daemons
+Requires:	hiredis, kamailio = %ver
+BuildRequires:	hiredis-devel
+
+%description	redis
+REDIS NoSQL database connector for Kamailio.
+%endif
+
+
+
+%prep
+%setup -n %{name}-%{ver}
+
+
+
+%build
+make cfg prefix=/usr cfg_prefix=$RPM_BUILD_ROOT basedir=$RPM_BUILD_ROOT \
+	cfg_target=/%{_sysconfdir}/kamailio/ modules_dirs="modules"
+make
+%if 0%{?fedora}
+make every-module skip_modules="app_java db_cassandra db_oracle dnssec \
+	iptrtpproxy memcached mi_xmlrpc osp" \
+	group_include="kstandard kmysql kpostgres kcpl kxml kradius kunixodbc \
+	kperl ksnmpstats kxmpp kcarrierroute kberkeley kldap kutils kpurple \
+	ktls kwebsocket kpresence klua kpython kgeoip ksqlite kjson kredis \
+	kmono kims koutbound ksctp kstun kautheph"
+%else
+make every-module skip_modules="app_java db_cassandra db_oracle dnssec \
+	iptrtpproxy memcached mi_xmlrpc osp" \
+	group_include="kstandard kmysql kpostgres kcpl kxml kunixodbc \
+	kperl ksnmpstats kxmpp kberkeley kldap kutils kpurple \
+	ktls kwebsocket kpresence klua kpython ksqlite \
+	kims koutbound ksctp kstun kautheph"
+%endif
+make utils
+
+
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install
+%if 0%{?fedora}
+make install-modules-all skip_modules="db_cassandra iptrtpproxy db_oracle \
+	memcached mi_xmlrpc osp" \
+	group_include="kstandard kmysql kpostgres kcpl kxml kradius kunixodbc \
+	kperl ksnmpstats kxmpp kcarrierroute kberkeley kldap kutils kpurple \
+	ktls kwebsocket kpresence klua kpython kgeoip ksqlite kjson kredis \
+	kmono kims koutbound ksctp kstun kautheph"
+
+mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
+install -m644 pkg/kamailio/fedora/%{?fedora}/kamailio.service \
+		$RPM_BUILD_ROOT/%{_unitdir}/kamailio.service
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
+install -m644 pkg/kamailio/fedora/%{?fedora}/kamailio.sysconfig \
+		$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/kamailio
+%else
+make install-modules-all skip_modules="db_cassandra iptrtpproxy db_oracle \
+	memcached mi_xmlrpc osp" \
+	group_include="kstandard kmysql kpostgres kcpl kxml kunixodbc \
+	kperl ksnmpstats kxmpp kberkeley kldap kutils kpurple \
+	ktls kwebsocket kpresence klua kpython ksqlite \
+	kims koutbound ksctp kstun kautheph"
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+install -m755 pkg/kamailio/centos/%{?centos}/kamailio.init \
+		$RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/kamailio
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
+install -m644 pkg/kamailio/centos/%{?centos}/kamailio.sysconfig \
+		$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/kamailio
+%endif
+
+
+
+%pre
+/usr/sbin/groupadd -r kamailio 2> /dev/null || :
+/usr/sbin/useradd -r -g kamailio -s /bin/false -c "Kamailio daemon" -d \
+		%{_libdir}/kamailio kamailio 2> /dev/null || :
+
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+
+%post
+%if 0%{?fedora}
+/bin/systemctl --system daemon-reload
+%else
+/sbin/chkconfig --add kamailio
+%endif
+
+
+
+%preun
+if [ $1 = 0 ]; then
+%if 0%{?fedora}
+	/bin/systemctl stop kamailio.service
+	/bin/systemctl disable kamailio.service 2> /dev/null
+%else
+	/sbin/service kamailio stop > /dev/null 2>&1
+	/sbin/chkconfig --del kamailio
+%endif
+fi
+
+
+
+%postun
+%if 0%{?fedora}
+/bin/systemctl --system daemon-reload
+%endif
+
+
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/kamailio
+%doc %{_docdir}/kamailio/AUTHORS
+%doc %{_docdir}/kamailio/NEWS
+%doc %{_docdir}/kamailio/INSTALL
+%doc %{_docdir}/kamailio/README
+%doc %{_docdir}/kamailio/README-MODULES
+
+%dir %{_docdir}/kamailio/modules
+%doc %{_docdir}/kamailio/modules/README.acc
+%doc %{_docdir}/kamailio/modules/README.alias_db
+%doc %{_docdir}/kamailio/modules/README.async
+%doc %{_docdir}/kamailio/modules/README.auth
+%doc %{_docdir}/kamailio/modules/README.auth_db
+%doc %{_docdir}/kamailio/modules/README.auth_diameter
+%doc %{_docdir}/kamailio/modules/README.avp
+%doc %{_docdir}/kamailio/modules/README.avpops
+%doc %{_docdir}/kamailio/modules/README.benchmark
+%doc %{_docdir}/kamailio/modules/README.blst
+%doc %{_docdir}/kamailio/modules/README.call_control
+%doc %{_docdir}/kamailio/modules/README.cfg_db
+%doc %{_docdir}/kamailio/modules/README.cfg_rpc
+%doc %{_docdir}/kamailio/modules/README.cfgutils
+%doc %{_docdir}/kamailio/modules/README.cnxcc
+%doc %{_docdir}/kamailio/modules/README.corex
+%doc %{_docdir}/kamailio/modules/README.counters
+%doc %{_docdir}/kamailio/modules/README.ctl
+%doc %{_docdir}/kamailio/modules/README.db_cluster
+%doc %{_docdir}/kamailio/modules/README.db_flatstore
+%doc %{_docdir}/kamailio/modules/README.db_text
+%doc %{_docdir}/kamailio/modules/README.db2_ops
+%doc %{_docdir}/kamailio/modules/README.debugger
+%doc %{_docdir}/kamailio/modules/README.dialog
+%doc %{_docdir}/kamailio/modules/README.dispatcher
+%doc %{_docdir}/kamailio/modules/README.diversion
+%doc %{_docdir}/kamailio/modules/README.dmq
+%doc %{_docdir}/kamailio/modules/README.domain
+%doc %{_docdir}/kamailio/modules/README.domainpolicy
+%doc %{_docdir}/kamailio/modules/README.drouting
+%doc %{_docdir}/kamailio/modules/README.enum
+%doc %{_docdir}/kamailio/modules/README.exec
+%doc %{_docdir}/kamailio/modules/README.group
+%doc %{_docdir}/kamailio/modules/README.htable
+%doc %{_docdir}/kamailio/modules/README.imc
+%doc %{_docdir}/kamailio/modules/README.ipops
+%doc %{_docdir}/kamailio/modules/README.kex
+%doc %{_docdir}/kamailio/modules/README.malloc_test
+%doc %{_docdir}/kamailio/modules/README.mangler
+%doc %{_docdir}/kamailio/modules/README.matrix
+%doc %{_docdir}/kamailio/modules/README.maxfwd
+%doc %{_docdir}/kamailio/modules/README.mediaproxy
+%doc %{_docdir}/kamailio/modules/README.mi_datagram
+%doc %{_docdir}/kamailio/modules/README.mi_fifo
+%doc %{_docdir}/kamailio/modules/README.mi_rpc
+%doc %{_docdir}/kamailio/modules/README.mqueue
+%doc %{_docdir}/kamailio/modules/README.msilo
+%doc %{_docdir}/kamailio/modules/README.msrp
+%doc %{_docdir}/kamailio/modules/README.mtree
+%doc %{_docdir}/kamailio/modules/README.nat_traversal
+%doc %{_docdir}/kamailio/modules/README.nathelper
+%doc %{_docdir}/kamailio/modules/README.p_usrloc
+%doc %{_docdir}/kamailio/modules/README.path
+%doc %{_docdir}/kamailio/modules/README.pdb
+%doc %{_docdir}/kamailio/modules/README.pdt
+%doc %{_docdir}/kamailio/modules/README.permissions
+%doc %{_docdir}/kamailio/modules/README.pike
+%doc %{_docdir}/kamailio/modules/README.pipelimit
+%doc %{_docdir}/kamailio/modules/README.prefix_route
+%doc %{_docdir}/kamailio/modules/README.print
+%doc %{_docdir}/kamailio/modules/README.print_lib
+%doc %{_docdir}/kamailio/modules/README.pv
+%doc %{_docdir}/kamailio/modules/README.qos
+%doc %{_docdir}/kamailio/modules/README.ratelimit
+%doc %{_docdir}/kamailio/modules/README.registrar
+%doc %{_docdir}/kamailio/modules/README.rr
+%doc %{_docdir}/kamailio/modules/README.rtimer
+%doc %{_docdir}/kamailio/modules/README.rtpproxy
+%doc %{_docdir}/kamailio/modules/README.rtpproxy-ng
+%doc %{_docdir}/kamailio/modules/README.sanity
+%doc %{_docdir}/kamailio/modules/README.sca
+%doc %{_docdir}/kamailio/modules/README.sdpops
+%doc %{_docdir}/kamailio/modules/README.seas
+%doc %{_docdir}/kamailio/modules/README.sipcapture
+%doc %{_docdir}/kamailio/modules/README.sipt
+%doc %{_docdir}/kamailio/modules/README.siptrace
+%doc %{_docdir}/kamailio/modules/README.siputils
+%doc %{_docdir}/kamailio/modules/README.sl
+%doc %{_docdir}/kamailio/modules/README.sms
+%doc %{_docdir}/kamailio/modules/README.speeddial
+%doc %{_docdir}/kamailio/modules/README.sqlops
+%doc %{_docdir}/kamailio/modules/README.sst
+%doc %{_docdir}/kamailio/modules/README.statistics
+%doc %{_docdir}/kamailio/modules/README.textops
+%doc %{_docdir}/kamailio/modules/README.textopsx
+%doc %{_docdir}/kamailio/modules/README.timer
+%doc %{_docdir}/kamailio/modules/README.tm
+%doc %{_docdir}/kamailio/modules/README.tmrec
+%doc %{_docdir}/kamailio/modules/README.tmx
+%doc %{_docdir}/kamailio/modules/README.topoh
+%doc %{_docdir}/kamailio/modules/README.uac
+%doc %{_docdir}/kamailio/modules/README.uac_redirect
+%doc %{_docdir}/kamailio/modules/README.uid_auth_db
+%doc %{_docdir}/kamailio/modules/README.uid_avp_db
+%doc %{_docdir}/kamailio/modules/README.uid_domain
+%doc %{_docdir}/kamailio/modules/README.uid_gflags
+%doc %{_docdir}/kamailio/modules/README.uid_uri_db
+%doc %{_docdir}/kamailio/modules/README.uri_db
+%doc %{_docdir}/kamailio/modules/README.userblacklist
+%doc %{_docdir}/kamailio/modules/README.usrloc
+%doc %{_docdir}/kamailio/modules/README.xhttp
+%doc %{_docdir}/kamailio/modules/README.xhttp_rpc
+%doc %{_docdir}/kamailio/modules/README.xlog
+%doc %{_docdir}/kamailio/modules/README.xprint
+
+%dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio
+%config(noreplace) %{_sysconfdir}/kamailio/*
+%if 0%{?fedora}
+%config %{_unitdir}/*
+%else
+%config %{_sysconfdir}/rc.d/init.d/*
+%endif
+%config %{_sysconfdir}/sysconfig/*
+
+%dir %{_libdir}/kamailio
+%{_libdir}/kamailio/libbinrpc.so
+%{_libdir}/kamailio/libbinrpc.so.0
+%{_libdir}/kamailio/libbinrpc.so.0.1
+%{_libdir}/kamailio/libkcore.so
+%{_libdir}/kamailio/libkcore.so.1
+%{_libdir}/kamailio/libkcore.so.1.0
+%{_libdir}/kamailio/libkmi.so
+%{_libdir}/kamailio/libkmi.so.1
+%{_libdir}/kamailio/libkmi.so.1.0
+%{_libdir}/kamailio/libprint.so
+%{_libdir}/kamailio/libprint.so.1
+%{_libdir}/kamailio/libprint.so.1.2
+%{_libdir}/kamailio/libsrdb1.so
+%{_libdir}/kamailio/libsrdb1.so.1
+%{_libdir}/kamailio/libsrdb1.so.1.0
+%{_libdir}/kamailio/libsrdb2.so
+%{_libdir}/kamailio/libsrdb2.so.1
+%{_libdir}/kamailio/libsrdb2.so.1.0
+%{_libdir}/kamailio/libsrutils.so
+%{_libdir}/kamailio/libsrutils.so.1
+%{_libdir}/kamailio/libsrutils.so.1.0
+%{_libdir}/kamailio/libtrie.so
+%{_libdir}/kamailio/libtrie.so.1
+%{_libdir}/kamailio/libtrie.so.1.0
+
+%dir %{_libdir}/kamailio/modules
+%{_libdir}/kamailio/modules/acc.so
+%{_libdir}/kamailio/modules/alias_db.so
+%{_libdir}/kamailio/modules/auth.so
+%{_libdir}/kamailio/modules/auth_db.so
+%{_libdir}/kamailio/modules/auth_diameter.so
+%{_libdir}/kamailio/modules/async.so
+%{_libdir}/kamailio/modules/avp.so
+%{_libdir}/kamailio/modules/avpops.so
+%{_libdir}/kamailio/modules/benchmark.so
+%{_libdir}/kamailio/modules/blst.so
+%{_libdir}/kamailio/modules/call_control.so
+%{_libdir}/kamailio/modules/cfg_db.so
+%{_libdir}/kamailio/modules/cfg_rpc.so
+%{_libdir}/kamailio/modules/cfgutils.so
+%{_libdir}/kamailio/modules/cnxcc.so
+%{_libdir}/kamailio/modules/corex.so
+%{_libdir}/kamailio/modules/counters.so
+%{_libdir}/kamailio/modules/ctl.so
+%{_libdir}/kamailio/modules/db_cluster.so
+%{_libdir}/kamailio/modules/db_text.so
+%{_libdir}/kamailio/modules/db_flatstore.so
+%{_libdir}/kamailio/modules/db2_ops.so
+%{_libdir}/kamailio/modules/debugger.so
+%{_libdir}/kamailio/modules/dialog.so
+%{_libdir}/kamailio/modules/dispatcher.so
+%{_libdir}/kamailio/modules/diversion.so
+%{_libdir}/kamailio/modules/dmq.so
+%{_libdir}/kamailio/modules/domain.so
+%{_libdir}/kamailio/modules/domainpolicy.so
+%{_libdir}/kamailio/modules/drouting.so
+%{_libdir}/kamailio/modules/enum.so
+%{_libdir}/kamailio/modules/exec.so
+%{_libdir}/kamailio/modules/group.so
+%{_libdir}/kamailio/modules/htable.so
+%{_libdir}/kamailio/modules/imc.so
+%{_libdir}/kamailio/modules/ipops.so
+%{_libdir}/kamailio/modules/kex.so
+%{_libdir}/kamailio/modules/malloc_test.so
+%{_libdir}/kamailio/modules/mangler.so
+%{_libdir}/kamailio/modules/matrix.so
+%{_libdir}/kamailio/modules/maxfwd.so
+%{_libdir}/kamailio/modules/mediaproxy.so
+%{_libdir}/kamailio/modules/mi_datagram.so
+%{_libdir}/kamailio/modules/mi_fifo.so
+%{_libdir}/kamailio/modules/mi_rpc.so
+%{_libdir}/kamailio/modules/mqueue.so
+%{_libdir}/kamailio/modules/msilo.so
+%{_libdir}/kamailio/modules/msrp.so
+%{_libdir}/kamailio/modules/mtree.so
+%{_libdir}/kamailio/modules/nat_traversal.so
+%{_libdir}/kamailio/modules/nathelper.so
+%{_libdir}/kamailio/modules/p_usrloc.so
+%{_libdir}/kamailio/modules/path.so
+%{_libdir}/kamailio/modules/pdb.so
+%{_libdir}/kamailio/modules/pdt.so
+%{_libdir}/kamailio/modules/permissions.so
+%{_libdir}/kamailio/modules/pike.so
+%{_libdir}/kamailio/modules/pipelimit.so
+%{_libdir}/kamailio/modules/prefix_route.so
+%{_libdir}/kamailio/modules/print.so
+%{_libdir}/kamailio/modules/print_lib.so
+%{_libdir}/kamailio/modules/pv.so
+%{_libdir}/kamailio/modules/qos.so
+%{_libdir}/kamailio/modules/ratelimit.so
+%{_libdir}/kamailio/modules/registrar.so
+%{_libdir}/kamailio/modules/rr.so
+%{_libdir}/kamailio/modules/rtimer.so
+%{_libdir}/kamailio/modules/rtpproxy.so
+%{_libdir}/kamailio/modules/rtpproxy-ng.so
+%{_libdir}/kamailio/modules/sanity.so
+%{_libdir}/kamailio/modules/sca.so
+%{_libdir}/kamailio/modules/seas.so
+%{_libdir}/kamailio/modules/sipcapture.so
+%{_libdir}/kamailio/modules/sipt.so
+%{_libdir}/kamailio/modules/siptrace.so
+%{_libdir}/kamailio/modules/siputils.so
+%{_libdir}/kamailio/modules/sl.so
+%{_libdir}/kamailio/modules/sdpops.so
+%{_libdir}/kamailio/modules/sms.so
+%{_libdir}/kamailio/modules/speeddial.so
+%{_libdir}/kamailio/modules/sqlops.so
+%{_libdir}/kamailio/modules/sst.so
+%{_libdir}/kamailio/modules/statistics.so
+%{_libdir}/kamailio/modules/textops.so
+%{_libdir}/kamailio/modules/textopsx.so
+%{_libdir}/kamailio/modules/timer.so
+%{_libdir}/kamailio/modules/tm.so
+%{_libdir}/kamailio/modules/tmrec.so
+%{_libdir}/kamailio/modules/tmx.so
+%{_libdir}/kamailio/modules/topoh.so
+%{_libdir}/kamailio/modules/uac.so
+%{_libdir}/kamailio/modules/uac_redirect.so
+%{_libdir}/kamailio/modules/uid_auth_db.so
+%{_libdir}/kamailio/modules/uid_avp_db.so
+%{_libdir}/kamailio/modules/uid_domain.so
+%{_libdir}/kamailio/modules/uid_gflags.so
+%{_libdir}/kamailio/modules/uid_uri_db.so
+%{_libdir}/kamailio/modules/uri_db.so
+%{_libdir}/kamailio/modules/userblacklist.so
+%{_libdir}/kamailio/modules/usrloc.so
+%{_libdir}/kamailio/modules/xhttp.so
+%{_libdir}/kamailio/modules/xhttp_rpc.so
+%{_libdir}/kamailio/modules/xlog.so
+%{_libdir}/kamailio/modules/xprint.so
+
+%{_sbindir}/kamailio
+%{_sbindir}/kamctl
+%{_sbindir}/kamdbctl
+%{_sbindir}/kamcmd
+
+%dir %{_libdir}/kamailio/kamctl
+%{_libdir}/kamailio/kamctl/kamctl.base
+%{_libdir}/kamailio/kamctl/kamctl.ctlbase
+%{_libdir}/kamailio/kamctl/kamctl.dbtext
+%{_libdir}/kamailio/kamctl/kamctl.fifo
+%{_libdir}/kamailio/kamctl/kamctl.ser
+%{_libdir}/kamailio/kamctl/kamctl.ser_mi
+%{_libdir}/kamailio/kamctl/kamctl.sqlbase
+%{_libdir}/kamailio/kamctl/kamctl.unixsock
+%{_libdir}/kamailio/kamctl/kamdbctl.base
+%{_libdir}/kamailio/kamctl/kamdbctl.dbtext
+
+%dir %{_libdir}/kamailio/kamctl/dbtextdb
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.py
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyc
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyo
+
+%{_mandir}/man5/*
+%if 0%{?fedora}
+%{_mandir}/man7/*
+%endif
+%{_mandir}/man8/*
+
+%dir %{_datadir}/kamailio
+%dir %{_datadir}/kamailio/dbtext
+%dir %{_datadir}/kamailio/dbtext/kamailio
+%{_datadir}/kamailio/dbtext/kamailio/*
+
+
+%files		auth-ephemeral
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.auth_ephemeral
+%{_libdir}/kamailio/modules/auth_ephemeral.so
+
+
+%files		auth-identity
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.auth_identity
+%{_libdir}/kamailio/modules/auth_identity.so
+
+
+%files		bdb
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_berkeley
+%{_sbindir}/kambdb_recover
+%{_libdir}/kamailio/modules/db_berkeley.so
+%{_libdir}/kamailio/kamctl/kamctl.db_berkeley
+%{_libdir}/kamailio/kamctl/kamdbctl.db_berkeley
+%dir %{_datadir}/kamailio/db_berkeley
+%{_datadir}/kamailio/db_berkeley/*
+
+
+%files		cdp
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.cdp
+%{_libdir}/kamailio/modules/cdp.so
+%doc %{_docdir}/kamailio/modules/README.cdp_avp
+%{_libdir}/kamailio/modules/cdp_avp.so
+
+
+%files		cpl
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.cpl-c
+%{_libdir}/kamailio/modules/cpl-c.so
+
+
+%files		dialplan
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.dialplan
+%{_libdir}/kamailio/modules/dialplan.so
+
+
+%files		ims
+%defattr(-,root,root)
+%{_libdir}/kamailio/libkamailio_ims.so
+%{_libdir}/kamailio/libkamailio_ims.so.0
+%{_libdir}/kamailio/libkamailio_ims.so.0.1
+%doc %{_docdir}/kamailio/modules/README.dialog_ng
+%{_libdir}/kamailio/modules/dialog_ng.so
+%doc %{_docdir}/kamailio/modules/README.ims_auth
+%{_libdir}/kamailio/modules/ims_auth.so
+%doc %{_docdir}/kamailio/modules/README.ims_icscf
+%{_libdir}/kamailio/modules/ims_icscf.so
+%doc %{_docdir}/kamailio/modules/README.ims_isc
+%{_libdir}/kamailio/modules/ims_isc.so
+%doc %{_docdir}/kamailio/modules/README.ims_qos
+%{_libdir}/kamailio/modules/ims_qos.so
+#%doc %{_docdir}/kamailio/modules/README.ims_registrar_pcscf
+%{_libdir}/kamailio/modules/ims_registrar_pcscf.so
+#%doc %{_docdir}/kamailio/modules/README.ims_registrar_scscf
+%{_libdir}/kamailio/modules/ims_registrar_scscf.so
+%doc %{_docdir}/kamailio/modules/README.ims_usrloc_pcscf
+%{_libdir}/kamailio/modules/ims_usrloc_pcscf.so
+#%doc %{_docdir}/kamailio/modules/README.ims_usrloc_scscf
+%{_libdir}/kamailio/modules/ims_usrloc_scscf.so
+
+
+%files		lcr
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.lcr
+%{_libdir}/kamailio/modules/lcr.so
+
+
+%files		ldap
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db2_ldap
+%doc %{_docdir}/kamailio/modules/README.h350
+%doc %{_docdir}/kamailio/modules/README.ldap
+%{_libdir}/kamailio/modules/db2_ldap.so
+%{_libdir}/kamailio/modules/h350.so
+%{_libdir}/kamailio/modules/ldap.so
+
+
+%files		lua
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_lua
+%{_libdir}/kamailio/modules/app_lua.so
+
+
+%files		mysql
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_mysql
+%{_libdir}/kamailio/modules/db_mysql.so
+%{_libdir}/kamailio/kamctl/kamctl.mysql
+%{_libdir}/kamailio/kamctl/kamdbctl.mysql
+%dir %{_datadir}/kamailio/mysql
+%{_datadir}/kamailio/mysql/*
+
+
+%files		outbound
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.outbound
+%{_libdir}/kamailio/modules/outbound.so
+
+
+%files		perl
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_perl
+%doc %{_docdir}/kamailio/modules/README.db_perlvdb
+%{_libdir}/kamailio/modules/app_perl.so
+%{_libdir}/kamailio/modules/db_perlvdb.so
+%dir %{_libdir}/kamailio/perl
+%{_libdir}/kamailio/perl/Kamailio.pm
+%dir %{_libdir}/kamailio/perl/Kamailio
+%{_libdir}/kamailio/perl/Kamailio/Constants.pm
+%{_libdir}/kamailio/perl/Kamailio/Message.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/LDAPUtils
+%{_libdir}/kamailio/perl/Kamailio/LDAPUtils/LDAPConf.pm
+%{_libdir}/kamailio/perl/Kamailio/LDAPUtils/LDAPConnection.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/Utils
+%{_libdir}/kamailio/perl/Kamailio/Utils/Debug.pm
+%{_libdir}/kamailio/perl/Kamailio/Utils/PhoneNumbers.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/VDB
+%{_libdir}/kamailio/perl/Kamailio/VDB/Column.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Pair.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/ReqCond.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Result.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/VTab.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Value.pm
+%dir %{_libdir}/kamailio/perl/Kamailio/VDB/Adapter
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/AccountingSIPtrace.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Alias.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Auth.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Describe.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/Speeddial.pm
+%{_libdir}/kamailio/perl/Kamailio/VDB/Adapter/TableVersions.pm
+
+
+%files		postgresql
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_postgres
+%{_libdir}/kamailio/modules/db_postgres.so
+%{_libdir}/kamailio/kamctl/kamctl.pgsql
+%{_libdir}/kamailio/kamctl/kamdbctl.pgsql
+%dir %{_datadir}/kamailio/postgres
+%{_datadir}/kamailio/postgres/*
+
+
+%files		presence
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.presence
+%doc %{_docdir}/kamailio/modules/README.presence_conference
+%doc %{_docdir}/kamailio/modules/README.presence_dialoginfo
+%doc %{_docdir}/kamailio/modules/README.presence_mwi
+%doc %{_docdir}/kamailio/modules/README.presence_profile
+%doc %{_docdir}/kamailio/modules/README.presence_reginfo
+%doc %{_docdir}/kamailio/modules/README.presence_xml
+%doc %{_docdir}/kamailio/modules/README.pua
+%doc %{_docdir}/kamailio/modules/README.pua_bla
+%doc %{_docdir}/kamailio/modules/README.pua_dialoginfo
+%doc %{_docdir}/kamailio/modules/README.pua_mi
+%doc %{_docdir}/kamailio/modules/README.pua_reginfo
+%doc %{_docdir}/kamailio/modules/README.pua_usrloc
+%doc %{_docdir}/kamailio/modules/README.pua_xmpp
+%doc %{_docdir}/kamailio/modules/README.rls
+%doc %{_docdir}/kamailio/modules/README.xcap_client
+%doc %{_docdir}/kamailio/modules/README.xcap_server
+%{_libdir}/kamailio/modules/presence.so
+%{_libdir}/kamailio/modules/presence_conference.so
+%{_libdir}/kamailio/modules/presence_dialoginfo.so
+%{_libdir}/kamailio/modules/presence_mwi.so
+%{_libdir}/kamailio/modules/presence_profile.so
+%{_libdir}/kamailio/modules/presence_reginfo.so
+%{_libdir}/kamailio/modules/presence_xml.so
+%{_libdir}/kamailio/modules/pua.so
+%{_libdir}/kamailio/modules/pua_bla.so
+%{_libdir}/kamailio/modules/pua_dialoginfo.so
+%{_libdir}/kamailio/modules/pua_mi.so
+%{_libdir}/kamailio/modules/pua_reginfo.so
+%{_libdir}/kamailio/modules/pua_usrloc.so
+%{_libdir}/kamailio/modules/pua_xmpp.so
+%{_libdir}/kamailio/modules/rls.so
+%{_libdir}/kamailio/modules/xcap_client.so
+%{_libdir}/kamailio/modules/xcap_server.so
+
+
+%files		purple
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.purple
+%{_libdir}/kamailio/modules/purple.so
+
+
+%files		python
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_python
+%{_libdir}/kamailio/modules/app_python.so
+
+
+%files		regex
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.regex
+%{_libdir}/kamailio/modules/regex.so
+
+
+%files		sctp
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.sctp
+%{_libdir}/kamailio/modules/sctp.so
+
+
+%files		snmpstats
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.snmpstats
+%{_libdir}/kamailio/modules/snmpstats.so
+
+
+%files		sqlite
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_sqlite
+%{_libdir}/kamailio/modules/db_sqlite.so
+%{_libdir}/kamailio/kamctl/kamctl.sqlite
+%{_libdir}/kamailio/kamctl/kamdbctl.sqlite
+%dir %{_datadir}/kamailio/db_sqlite
+%{_datadir}/kamailio/db_sqlite/*
+
+
+%files		stun
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.stun
+%{_libdir}/kamailio/modules/stun.so
+
+
+%files		tls
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.tls
+%{_libdir}/kamailio/modules/tls.so
+
+
+%files		unixODBC
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_unixodbc
+%{_libdir}/kamailio/modules/db_unixodbc.so
+
+
+%files		utils
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.utils
+%{_libdir}/kamailio/modules/utils.so
+
+
+%files		websocket
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.websocket
+%{_libdir}/kamailio/modules/websocket.so
+
+
+%files		xhttp-pi
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xhttp_pi
+%{_libdir}/kamailio/modules/xhttp_pi.so
+%dir %{_datadir}/kamailio/xhttp_pi
+%{_datadir}/kamailio/xhttp_pi/*
+
+
+%files		xmlops
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xmlops
+%{_libdir}/kamailio/modules/xmlops.so
+
+
+%files		xmlrpc
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xmlrpc
+%{_libdir}/kamailio/modules/xmlrpc.so
+
+
+%files		xmpp
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.xmpp
+%{_libdir}/kamailio/modules/xmpp.so
+
+
+%if 0%{?fedora}
+%files		carrierroute
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.carrierroute
+%{_libdir}/kamailio/modules/carrierroute.so
+
+
+%files		radius
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.acc_radius
+%{_docdir}/kamailio/modules/README.auth_radius
+%{_docdir}/kamailio/modules/README.misc_radius
+%{_docdir}/kamailio/modules/README.peering
+%{_libdir}/kamailio/modules/acc_radius.so
+%{_libdir}/kamailio/modules/auth_radius.so
+%{_libdir}/kamailio/modules/misc_radius.so
+%{_libdir}/kamailio/modules/peering.so
+
+
+%files		json
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.json
+%doc %{_docdir}/kamailio/modules/README.jsonrpc-c
+%{_libdir}/kamailio/modules/json.so
+%{_libdir}/kamailio/modules/jsonrpc-c.so
+
+
+%files		GeoIP
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.geoip
+%{_libdir}/kamailio/modules/geoip.so
+
+
+%files		mono
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_mono
+%{_libdir}/kamailio/modules/app_mono.so
+
+
+%files		redis
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.ndb_redis
+%{_libdir}/kamailio/modules/ndb_redis.so
+%endif
+
+
+
+%changelog
+* Thu Aug 22 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Added rtpproxy-ng module to build
+* Wed Aug 14 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev7
+* Mon May 27 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Created package for auth_ephemeral module
+* Sun May 26 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Created package for sctp module
+  - Updated rel to dev6
+* Sat May 18 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Refactored .spec
+  - Put tls module back in its own .spec (OpenSSL no longer needed by core as
+    stun is in its own module)
+  - Updated rel to dev5
+* Wed Apr 24 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev3
+* Wed Apr 10 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Added sipt module to .spec
+  - Updated rel to dev2
+* Fri Mar 29 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Added stun module to .spec
+  - Updated rel to dev1
+* Wed Mar 27 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Added cnxcc module to .spec
+* Thu Mar 7 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Added build requirement for docbook2X for Fedora builds
+* Wed Mar 6 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Restored perl related files
+* Tue Mar 5 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev0 and ver to 4.1.0
+  - Re-ordered file to make it internally consistent
+  - Updated make commands to match updated module groups
+  - Added auth_identity back in
+  - Temporarily commented out perl related files as perl modules do not appear
+    to be working
+* Sun Jan 20 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to pre1
+  - Moved modules from modules_k/ to modules/
+  - Renamed perl modules
+* Fri Jan 11 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to pre0
+* Thu Jan 10 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - More IMS updates
+* Tue Jan 8 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Changed dialog2 to dialog_ng
+  - Renamed all IMS modules (prepended ims_)
+* Sun Jan 6 2013 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated ver to 4.0.0 and rel to dev8
+* Mon Dec 31 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added dialog2 and IMS modules to the build
+* Fri Dec 21 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added db2_ldap, db2_ops, and timer to the build
+  - Added uid_auth_db, uid_avp_db, uid_domain, uid_gflags, uid_uri_db, print,
+    and print_lib to the build
+* Thu Dec 13 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added xhttp_pi framework examples to the installation
+  - Added xhttp_pi README to the installation
+* Wed Dec 12 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added mangler module to the build
+  - Tidied up make commands used to build and install
+* Sun Dec 9 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev7
+  - Added avp, sca, and xprint modules to the build
+  - Moved xlog from modules_k to modules
+* Fri Nov 9 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev5
+* Tue Oct 30 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added xhttp_pi module to RPM builds
+* Fri Oct 20 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Set ownership of /etc/kamailio to kamailio.kamailio
+  - Added installation of auth.7.gz for Fedora now that manpages are built for
+    Fedora
+  - Added "make utils" to the build section (when it's not there utils get
+    built during the install - which isn't right)
+  - SCTP and STUN now included in this build
+  - Removed kamailio-tls package - tls module now in main kamailio RPM as that
+    has openssl as a dependency for STUN
+* Sun Sep 17 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added corex module to RPM builds
+  - Updated rel to dev4
+* Sun Aug 19 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev3
+* Mon Aug 13 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added Outbound module
+* Fri Jul 13 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev2
+* Thu Jul 5 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added kamailio-cdp RPM for cdp and cdp_avp modules
+* Tue Jul 3 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updates to websocket module
+* Sat Jun 30 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to dev1
+  - Removed %_sharedir and replaced with standard macro %_datadir
+* Sat Jun 23 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added websocket module
+* Mon Jun 11 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated ver to 3.4.0 and rel to dev0
+* Mon Jun 4 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added a number of %dir lines to make sure the RPMs are properly cleaned up
+    on uninstall
+* Sat Jun 2 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added %postun section to reload systemd on Fedora after uninstall
+  - Added build requirement for redhat-rpm-config so debuginfo RPMs get built
+* Fri Jun 1 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Tweak to the pkg/kamailio/fedora directory structure
+  - Tested with Fedora 17
+* Thu May 31 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to pre3
+  - Combined Fedora/CentOS .spec in preparation for Fedora 17
+* Sun May 20 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - First version created for Kamailio 3.3.0. Based on spec-file for Fedora
+    created by myself (in turn based on an older spec-file for CentOS created
+    by Ovidiu Sas).
+  - Tested with CentOS 6.2 x86_64.
+  - Builds all Kamailio 3.3.0 modules (modules/modules_k) except:
+    - modules/app_mono: Requires mono which is not in the CentOS 6 repo
+    - modules/auth_identity: Conflicts with TLS unless statically linked (which
+      requires changes to Makefile and is impractical for generic RPM building)
+    - modules/db_cassandra: Requires Cassandra and Thrift which are not in the
+      CentOS 6 repo
+    - modules/geoip: Requires GeoIP which is not in the CentOS 6 repo
+    - modules/iptrtpproxy: Needs local copy of iptables source to build
+      (impractical for generic RPM building)
+    - modules/json: Requires json-c whish is not in the CentOS 6 repo
+    - modules/jsonrpc-c: Requires json-c whish is not in the CentOS 6 repo
+    - modules/ndb_redis: Requires hiredis which is not in the CentOS 6 repo
+    - modules/peering: Requires radiusclient-ng which is not in the CentOS 6
+      repo
+    - modules_k/acc_radius: Requires radiusclient-ng which is not in the CentOS
+      6 repo
+    - modules_k/auth_radius: Required radiusclient-ng which is not in the
+      CentOS 6 repo
+    - modules_k/carrierroute: Requires libconfuse which is not in the CentOS 6
+      repo
+    - modules_k/db_oracle: Requires Oracle which is not in the CentOS 6 repo
+      (and is closed-source)
+    - modules_k/memcached: Module compilation appears to require an older
+      version of libmemcached-devel than the one in the CentOS 6 repo
+    - modules_k/mi_xmlrpc: Requires libxmlrpc-c3 which is not in the CentOS 6
+      repo
+    - modules_k/misc_radius: Requires radiusclient-ng which is not in the
+      CentOS 6 repo
+    - modules_k/osp: Requires OSP Toolkit which is not in the CentOS 6 repo
+* Fri May 18 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Added missing BuildRequires (gcc).
+  - Added .fc16 to rel.  This makes it easy to tell which distribution the RPMs
+    are built for.
+* Thu May 17 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Updated rel to pre2.
+* Mon May 7 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - Changed to use systemd instead of SysV init.
+* Sun May 6 2012 Peter Dunkley <peter at dunkley.me.uk>
+  - First version created for Kamailio 3.3.0. Based on spec-file for CentOS
+    created by Ovidiu Sas.
+  - Tested with Fedora 16 x86_64.
+  - Builds all Kamailio 3.3.0 modules (modules/modules_k) except:
+    - modules/auth_identity: Conflicts with TLS unless statically linked (which
+      requires changes to Makefile and is impractical for generic RPM building)
+    - modules/db_cassandra: Requires Thrift which is not in the F16 repo
+    - modules/iptrtpproxy: Needs local copy of iptables source to build
+      (impractical for generic RPM building)
+    - modules_k/db_oracle: Requires Oracle which is not in the F16 repo
+      (and is closed-source)
+    - modules_k/memcached: Module compilation appears to require an older
+      version of libmemcached-devel than the one in the F16 repo
+    - modules_k/mi_xmlrpc: The F16 repo contains an unsupported version of
+      libxmlrpc-c3, and there is an compilation error due to the module code
+      using an unknown type ('TString')
+    - modules_k/osp: Requires OSP Toolkit which is not in the F16 repo
diff --git a/pkg/kamailio/fedora/17/kamailio.sysconfig b/pkg/kamailio/fedora/17/kamailio.sysconfig
new file mode 100644
index 0000000..60916b5
--- /dev/null
+++ b/pkg/kamailio/fedora/17/kamailio.sysconfig
@@ -0,0 +1,12 @@
+#
+# Kamailio startup options
+#
+
+# Options to pass when starting Kamailio
+# Note: variable interpolation is not supported by systemd so $OPTIONS cannot
+#       be constructed from multiple variables.
+# -m - Kamailio shared (global) memory (default 32 MB)
+# -M - Kamailio package (per-process private) memory (default 4 MB)
+# -u - User to run Kamailio as
+# -g - Group to run Kamailio as
+OPTIONS="-m 32 -M 4 -u kamailio -g kamailio"
diff --git a/pkg/kamailio/fedora/18/README b/pkg/kamailio/fedora/18/README
new file mode 120000
index 0000000..7331e24
--- /dev/null
+++ b/pkg/kamailio/fedora/18/README
@@ -0,0 +1 @@
+../17/README
\ No newline at end of file
diff --git a/pkg/kamailio/fedora/18/kamailio-build.appl b/pkg/kamailio/fedora/18/kamailio-build.appl
new file mode 100644
index 0000000..27bcc51
--- /dev/null
+++ b/pkg/kamailio/fedora/18/kamailio-build.appl
@@ -0,0 +1,49 @@
+name: "kamailio-build-fc18-#BASE_ARCH#"
+summary: "Fedora 18 image for building Kamailio #BASE_ARCH# RPMs"
+os:
+  name: fedora
+  version: 18
+  password: kamailio
+hardware:
+  memory: 1024
+  partitions:
+    "/":
+      size: 6
+packages:
+  - @core
+  - @base
+  - bison			# kamailio
+  - db4-devel			# kamailio-bdb
+  - docbook2X
+  - expat-devel			# kamailio-xmpp
+  - flex			# kamailio
+  - GeoIP-devel			# kamailio-GeoIP
+  - gcc
+  - git
+  - glib-devel			# kamailio-purple
+  - hiredis-devel		# kamailio-redis
+  - json-c-devel		# kamailio-json
+  - libconfuse-devel		# kamailio-carrierroute
+  - libcurl-devel		# kamailio-utils, kamailio-presence
+  - libevent-devel		# kamailio-json
+  - libpurple-devel		# kamailio-purple
+  - libunistring-devel		# kamailio-websocket
+  - libxml2-devel		# kamailio-cdp, kamailio-cpl, kamailio-ims, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xhttp-pi, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools-devel		# kamailio
+  - lua-devel			# kamailio-lua
+  - make			# kamailio
+  - mod_perl-devel		# kamailio-perl
+  - mono-devel			# kamailio-mono
+  - mysql-devel			# kamailio-mysql
+  - net-snmp-devel		# kamailio-snmpstats
+  - openldap-devel		# kamailio-ldap
+  - openssl-devel		# kamailio
+  - pcre-devel			# kamailio-regex, kamailio-dialplan, kamailio-lcr
+  - postgresql-devel		# kamailio-postgresql
+  - python-devel		# kamailio-python
+  - radiusclient-ng-devel	# kamailio-radius
+  - redhat-rpm-config		# kamailio-debuginfo
+  - rpm-build
+  - sqlite-devel		# kamailio-sqlite
+  - unixODBC-devel		# kamailio-unixODBC
+  - zlib-devel			# kamailio-mysql
diff --git a/pkg/kamailio/fedora/18/kamailio.appl b/pkg/kamailio/fedora/18/kamailio.appl
new file mode 100644
index 0000000..dc5e757
--- /dev/null
+++ b/pkg/kamailio/fedora/18/kamailio.appl
@@ -0,0 +1,42 @@
+name: "kamailio-fc18-#BASE_ARCH#"
+summary: "Fedora 18 image for installing Kamailio #BASE_ARCH# RPMs"
+os:
+  name: fedora
+  version: 18
+  password: kamailio
+hardware:
+  memory: 1024
+  partitions:
+    "/":
+      size: 2
+packages:
+  - @core
+  - @base
+  - db4				# kamailio-bdb
+  - expat			# kamailio-xmpp
+  - GeoIP			# kamailio-GeoIP
+  - glib			# kamailio-purple
+  - hiredis			# kamailio-redis
+  - json-c			# kamailio-json
+  - libconfuse			# kamailio-carrierroute
+  - libcurl			# kamailio-utils, kamailio-presence
+  - libevent			# kamailio-json
+  - libpurple			# kamailio-purple
+  - libunistring		# kamailio-websocket
+  - libxml2			# kamailio-cdp, kamailio-cpl, kamailio-ims, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xhttp-pi, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools		# kamailio
+  - mod_perl			# kamailio-perl
+  - mono-core			# kamailio-mono
+  - mysql-libs			# kamailio-mysql
+  - net-snmp-libs		# kamailio-snmpstats
+  - openldap			# kamailio-ldap
+  - openssl			# kamailio
+  - pcre			# kamailio-regex, kamailio-dialplan, kamailio-lcr
+  - perl-Authen-SASL		# kamailio-perl
+  - perl-LDAP			# kamailio-perl
+  - postgresql-libs		# kamailio-postgresql
+  - python			# kamailio-python
+  - radiusclient-ng		# kamailio-radius
+  - sqlite			# kamailio-sqlite
+  - unixODBC			# kamailio-unixODBC
+  - zlib			# kamailio-mysql
diff --git a/pkg/kamailio/fedora/18/kamailio.service b/pkg/kamailio/fedora/18/kamailio.service
new file mode 120000
index 0000000..b57fd37
--- /dev/null
+++ b/pkg/kamailio/fedora/18/kamailio.service
@@ -0,0 +1 @@
+../17/kamailio.service
\ No newline at end of file
diff --git a/pkg/kamailio/fedora/18/kamailio.spec b/pkg/kamailio/fedora/18/kamailio.spec
new file mode 120000
index 0000000..4e06dfc
--- /dev/null
+++ b/pkg/kamailio/fedora/18/kamailio.spec
@@ -0,0 +1 @@
+../17/kamailio.spec
\ No newline at end of file
diff --git a/pkg/kamailio/fedora/18/kamailio.sysconfig b/pkg/kamailio/fedora/18/kamailio.sysconfig
new file mode 120000
index 0000000..53dfcf3
--- /dev/null
+++ b/pkg/kamailio/fedora/18/kamailio.sysconfig
@@ -0,0 +1 @@
+../17/kamailio.sysconfig
\ No newline at end of file
diff --git a/pkg/kamailio/freebsd/Makefile b/pkg/kamailio/freebsd/Makefile
new file mode 100644
index 0000000..dee6360
--- /dev/null
+++ b/pkg/kamailio/freebsd/Makefile
@@ -0,0 +1,201 @@
+# New ports collection makefile for:	kamailio
+# Date created:				20 October 2005
+# Whom:					jesusr
+#
+# $FreeBSD: ports/net/kamailio/Makefile,v 1.9 2007/08/20 09:12:42 miwi Exp $
+#
+
+PORTNAME=	kamailio
+PORTVERSION=	1.3.0
+CATEGORIES=	net
+MASTER_SITES=	http://kamailio.org/pub/kamailio/${PORTVERSION}/src/
+DISTNAME=	${PORTNAME}-${PORTVERSION}-tls_src
+
+MAINTAINER=	jesusr at FreeBSD.org
+COMMENT=	A very fast and configurable SIP proxy with TLS support
+
+LIB_DEPENDS=	radiusclient-ng.2:${PORTSDIR}/net/radiusclient
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}-tls
+
+USE_GMAKE=	yes
+MAKE_ENV=	CC="${CC}" \
+		CC_EXTRA_OPTS="${CFLAGS}" \
+		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+		PTHREAD_LIBS="${PTHREAD_LIBS}"
+
+PLIST_FILES=	sbin/kamailio sbin/kamctl sbin/kamdbctl sbin/kamunix \
+		lib/kamailio/kamctl/kamctl.base lib/kamailio/kamctl/kamctl.ctlbase \
+		lib/kamailio/kamctl/kamctl.dbtext lib/kamailio/kamctl/kamctl.fifo \
+		lib/kamailio/kamctl/kamctl.sqlbase lib/kamailio/kamctl/kamctl.unixsock \
+		lib/kamailio/kamctl/kamdbctl.base lib/kamailio/kamctl/kamdbctl.dbtext \
+		etc/kamailio/kamctlrc
+
+PLIST_DIRS=	lib/kamailio/modules lib/kamailio/kamctl lib/kamailio
+
+MODULES=	acc alias_db auth auth_db auth_diameter avpops benchmark \
+		cfgutils dbtext dialog dispatcher diversion domain \
+		domainpolicy enum exec flatstore gflags group imc lcr \
+		mangler maxfwd mediaproxy mi_datagram mi_fifo msilo nathelper \
+		options path pdt permissions pike registrar rr seas \
+		siptrace sl sms speeddial sst statistics textops tm uac \
+		uac_redirect uri uri_db usrloc xlog
+
+RC_FILES=	acc/radiusclient.conf \
+		acc/servers \
+		dictionary.radius \
+		kamailio.cfg
+RC_DIRS=	acc
+
+ONLY_FOR_ARCHS=	i386
+
+MAN5=		kamailio.cfg.5
+MAN8=		kamailio.8 \
+		kamctl.8 \
+		kamunix.8
+
+PORTDOCS=	*
+
+SUB_FILES=	pkg-install pkg-deinstall
+SUB_LIST=	RC_DIRS="${RC_DIRS}" RC_FILES="${RC_FILES}"
+
+OPTIONS=	MYSQL "MySQL support" on \
+		POSTGRESQL "PostgreSQL support" off \
+		UNIXODBC "UnixODBC support" off \
+		CPL "CPL-C support" off \
+		TLS "TLS support" off \
+		SNMPSTATS "SNMPStats support" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MYSQL)
+USE_MYSQL=	yes
+MODULES+=	mysql
+PLIST_FILES+=	lib/kamailio/kamctl/kamdbctl.mysql lib/kamailio/kamctl/kamctl.mysql
+.else
+MAKE_ENV+=	MYSQL=mysql
+.endif
+
+.if defined(WITH_POSTGRESQL)
+USE_PGSQL=	yes
+MODULES+=	postgres
+PLIST_FILES+=	lib/kamailio/kamctl/kamdbctl.pgsql lib/kamailio/kamctl/kamctl.pgsql
+.else
+MAKE_ENV+=	POSTGRESQL=postgres
+.endif
+
+.if defined(WITH_UNIXODBC)
+LIB_DEPENDS+=	odbc.1:${PORTSDIR}/databases/unixODBC
+MODULES+=	unixodbc
+.else
+MAKE_ENV+=	UNIXODBC=unixodbc
+.endif
+
+.if defined(WITH_CPL)
+USE_GNOME=	libxml2
+MODULES+=	cpl-c
+PLIST_FILES+=	etc/kamailio/cpl-06.dtd
+.else
+MAKE_ENV+=	CPL=cpl-c
+.endif
+
+.if defined(WITH_TLS)
+MODULES+=	tlsops
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+TLS_RC_FILES=	tls/rootCA/cacert.pem \
+		tls/rootCA/certs/01.pem \
+		tls/rootCA/index.txt \
+		tls/rootCA/private/cakey.pem \
+		tls/rootCA/serial \
+		tls/user/user-calist.pem \
+		tls/user/user-cert.pem \
+		tls/user/user-cert_req.pem \
+		tls/user/user-privkey.pem \
+		tls/README \
+		tls/ca.conf \
+		tls/request.conf \
+		tls/user.conf
+RC_FILES+=	${TLS_RC_FILES}
+TLS_RC_DIRS=	tls/user \
+		tls/rootCA/certs \
+		tls/rootCA/private \
+		tls/rootCA \
+		tls
+RC_DIRS+=	${TLS_RC_DIRS}
+.else
+MAKE_ENV+=	TLSOPS=tlsops
+MAKE_ARGS+=	TLS=""
+.endif
+
+.if defined(WITH_SNMPSTATS)
+RUN_DEPENDS+=	snmpcheck:${PORTSDIR}/net-mgmt/net-snmp
+MODULES+=	snmpstats
+.else
+MAKE_ENV+=	SNMPSTATS=snmpstats
+.endif
+
+PLIST_FILES+=	${MODULES:S|^|lib/kamailio/modules/|:S|$|.so|} \
+		${RC_FILES:S|^|etc/kamailio/|:S|$|.default|}
+
+post-patch:
+.if defined(NOPORTDOCS)
+	@${REINPLACE_CMD} -e 's|install-doc install-man|install-man|' \
+		${WRKSRC}/Makefile
+.endif
+	@${REINPLACE_CMD} -e 's|-g -O9 ||' -e 's|-O9 ||' ${WRKSRC}/Makefile.defs
+	@${REINPLACE_CMD} -e 's|/usr/local/etc/kamailio|${PREFIX}/etc/kamailio|' \
+		${WRKSRC}/scripts/kamdbctl.dbtext
+	@${REINPLACE_CMD} -e 's|/usr/local/share/kamailio|${PREFIX}/share/kamailio|' \
+		${WRKSRC}/scripts/kamdbctl.dbtext
+	@${REINPLACE_CMD} -e 's|/etc/kamailio|${PREFIX}/etc/kamailio|' \
+		${WRKSRC}/modules/mediaproxy/README \
+		${WRKSRC}/modules/cpl-c/README \
+		${WRKSRC}/INSTALL
+	@${REINPLACE_CMD} -e 's|/usr/local/sbin/kamailio|${PREFIX}/sbin/kamailio|' \
+		${WRKSRC}/INSTALL
+	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \
+		${WRKSRC}/etc/kamailio.cfg \
+		${WRKSRC}/scripts/kamctl \
+		${WRKSRC}/scripts/kamctl.8 \
+		${WRKSRC}/scripts/kamctl.base \
+		${WRKSRC}/scripts/kamctl.db_berkeley \
+		${WRKSRC}/scripts/kamctl.dbtext \
+		${WRKSRC}/scripts/kamctlrc \
+		${WRKSRC}/scripts/kamdbctl \
+		${WRKSRC}/scripts/kamdbctl.base \
+		${WRKSRC}/scripts/kamdbctl.db_berkeley \
+		${WRKSRC}/scripts/kamdbctl.dbtext \
+		${WRKSRC}/scripts/kamdbctl.mysql \
+		${WRKSRC}/scripts/kamdbctl.pgsql \
+		${WRKSRC}/modules/acc/README \
+		${WRKSRC}/modules/avp_radius/README \
+		${WRKSRC}/modules/db_berkeley/README \
+		${WRKSRC}/modules/ldap/README \
+		${WRKSRC}/modules/osp/README \
+		${WRKSRC}/modules/perl/README \
+		${WRKSRC}/modules/seas/README \
+		${WRKSRC}/modules/snmpstats/README \
+		${WRKSRC}/modules/speeddial/README \
+		${WRKSRC}/modules/unixodbc/README
+	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
+		${WRKSRC}/modules/acc/etc/radiusclient.conf
+	@${REINPLACE_CMD} -e 's|/usr/local/etc/radiusclient|${PREFIX}/etc/kamailio/acc|' \
+		${WRKSRC}/modules/acc/acc_mod.c ${WRKSRC}/modules/acc/README
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/etc/kamailio.cfg \
+		${PREFIX}/etc/kamailio/kamailio.cfg.default
+	${MKDIR} ${PREFIX}/etc/kamailio/acc
+	${INSTALL_DATA} ${WRKSRC}/modules/acc/etc/radiusclient.conf \
+		${PREFIX}/etc/kamailio/acc/radiusclient.conf.default
+	${INSTALL_DATA} ${WRKSRC}/modules/acc/etc/servers \
+		${PREFIX}/etc/kamailio/acc/servers.default
+.for d in ${TLS_RC_DIRS}
+	${MKDIR} ${PREFIX}/etc/kamailio/${d}
+.endfor
+.for f in ${TLS_RC_FILES}
+	${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/kamailio/${f}.default
+.endfor
+	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+.include <bsd.port.post.mk>
diff --git a/pkg/kamailio/freebsd/distinfo b/pkg/kamailio/freebsd/distinfo
new file mode 100644
index 0000000..fd36f3f
--- /dev/null
+++ b/pkg/kamailio/freebsd/distinfo
@@ -0,0 +1,3 @@
+MD5 (kamailio-1.3.0-tls_src.tar.gz) = e380fa73095274162fac129e16d7c7d8
+SHA256 (kamailio-1.3.0-tls_src.tar.gz) = afd43b70e5887c5f91769bbc22506e8a6e0da90a91bf699da17f73988fc61fcf
+SIZE (kamailio-1.3.0-tls_src.tar.gz) = 3405325
diff --git a/pkg/kamailio/freebsd/files/patch-Makefile b/pkg/kamailio/freebsd/files/patch-Makefile
new file mode 100644
index 0000000..6b4f892
--- /dev/null
+++ b/pkg/kamailio/freebsd/files/patch-Makefile
@@ -0,0 +1,78 @@
+--- Makefile.orig	Thu Dec 13 18:49:12 2007
++++ Makefile	Thu Dec 13 21:49:54 2007
+@@ -48,11 +48,11 @@
+ skip_modules?=
+ 
+ # if not set on the cmd. line or the env, exclude this modules:
+-exclude_modules?= jabber cpl-c mysql postgres osp unixodbc \
+-	avp_radius auth_radius group_radius uri_radius xmpp \
++exclude_modules?= 	$(MYSQL) $(POSTGRESQL) $(CPL) $(SNMPSTATS) $(TLSOPS) $(UNIXODBC) \
++	jabber osp avp_radius auth_radius group_radius uri_radius xmpp \
+ 	presence presence_xml presence_mwi pua pua_bla pua_mi \
+ 	pua_usrloc pua_xmpp rls mi_xmlrpc perl snmpstats perlvdb \
+-	ldap carrierroute h350 xcap_client db_berkeley seas
++	ldap carrierroute h350 xcap_client db_berkeley
+ ifeq ($(TLS),)
+ 	exclude_modules+= tlsops
+ endif
+@@ -392,24 +392,11 @@
+ 		
+ # note: on solaris 8 sed: ? or \(...\)* (a.s.o) do not work
+ install-cfg: $(cfg-prefix)/$(cfg-dir)
+-		sed -e "s#/usr/.*lib/$(NAME)/modules/#$(modules-target)#g" \
+-			< etc/$(NAME).cfg > $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample0
+-		sed -e "s#/usr/.*etc/$(NAME)/tls/#$(cfg-target)tls/#g" \
+-			< $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample0 \
+-			> $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample
+-		rm -fr $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample0
+-		chmod 644 $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample
+-		if [ -z "${skip_cfg_install}" -a \
+-				! -f $(cfg-prefix)/$(cfg-dir)$(NAME).cfg ]; then \
+-			mv -f $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample \
+-				$(cfg-prefix)/$(cfg-dir)$(NAME).cfg; \
+-		fi
+ 		# radius dictionary
+-		$(INSTALL_TOUCH) $(cfg-prefix)/$(cfg-dir)/dictionary.radius.sample
+-		$(INSTALL_CFG) etc/dictionary.radius \
+-			$(cfg-prefix)/$(cfg-dir)/dictionary.radius.sample
++		$(INSTALL_TOUCH) $(cfg-prefix)/$(cfg-dir)/dictionary.radius.default
++		$(INSTALL_CFG) etc/dictionary.radius $(cfg-prefix)/$(cfg-dir)/dictionary.radius.default
+ 		if [ ! -f $(cfg-prefix)/$(cfg-dir)/dictionary.radius ]; then \
+-			mv -f $(cfg-prefix)/$(cfg-dir)/dictionary.radius.sample \
++			cp -f $(cfg-prefix)/$(cfg-dir)/dictionary.radius.default \
+ 				$(cfg-prefix)/$(cfg-dir)/dictionary.radius; \
+ 		fi
+ 		# kamctl config
+@@ -445,7 +432,7 @@
+ 		sed -e "s#/usr/local/lib/kamailio/#$(lib-target)#g" | \
+ 		sed -e "s#/usr/local/etc/kamailio/#$(cfg-target)#g"  >/tmp/kamctl
+ 		$(INSTALL_TOUCH) $(bin-prefix)/$(bin-dir)/kamctl
+-		$(INSTALL_BIN) /tmp/kamctl $(bin-prefix)/$(bin-dir)
++		$(BSD_INSTALL_SCRIPT) /tmp/kamctl $(bin-prefix)/$(bin-dir)
+ 		rm -fr /tmp/kamctl
+ 		sed -e "s#/usr/local/sbin#$(bin-target)#g" \
+ 			< scripts/kamctl.base > /tmp/kamctl.base
+@@ -492,10 +479,10 @@
+ 		sed -e "s#/usr/local/lib/kamailio/#$(lib-target)#g" | \
+ 		sed -e "s#/usr/local/etc/kamailio/#$(cfg-target)#g"  >/tmp/kamdbctl
+ 		$(INSTALL_TOUCH) $(bin-prefix)/$(bin-dir)/kamdbctl
+-		$(INSTALL_BIN) /tmp/kamdbctl $(bin-prefix)/$(bin-dir)
++		$(BSD_INSTALL_SCRIPT) /tmp/kamdbctl $(bin-prefix)/$(bin-dir)
+ 		rm -fr /tmp/kamdbctl
+ 		$(INSTALL_TOUCH)   $(bin-prefix)/$(bin-dir)/$(NAME)unix
+-		$(INSTALL_BIN) utils/$(NAME)unix/$(NAME)unix $(bin-prefix)/$(bin-dir)
++		$(BSD_INSTALL_SCRIPT) utils/$(NAME)unix/$(NAME)unix $(bin-prefix)/$(bin-dir)
+ 		# install dbtext stuff
+ 		mkdir -p $(modules-prefix)/$(lib-dir)/kamctl ; \
+ 		sed -e "s#/usr/local/share/kamailio/#$(data-target)#g" \
+@@ -624,9 +611,7 @@
+ 			if [ -f modules/"$$r"/README ]; then \
+ 				$(INSTALL_TOUCH)  $(doc-prefix)/$(doc-dir)/README ; \
+ 				$(INSTALL_DOC)  modules/"$$r"/README  \
+-									$(doc-prefix)/$(doc-dir)/README ; \
+-				mv -f $(doc-prefix)/$(doc-dir)/README \
+-						$(doc-prefix)/$(doc-dir)/README."$$r" ; \
++					$(doc-prefix)/$(doc-dir)/README."$$r" ; \
+ 			fi ; \
+ 		fi ; \
+ 	done 
diff --git a/pkg/kamailio/freebsd/files/patch-Makefile-mysql b/pkg/kamailio/freebsd/files/patch-Makefile-mysql
new file mode 100644
index 0000000..3005ace
--- /dev/null
+++ b/pkg/kamailio/freebsd/files/patch-Makefile-mysql
@@ -0,0 +1,11 @@
+--- modules/mysql/Makefile.orig	Thu Dec 13 20:15:16 2007
++++ modules/mysql/Makefile	Thu Dec 13 20:15:20 2007
+@@ -8,7 +8,7 @@
+ 
+ # set CROSS_COMPILE to true if you want to skip
+ # the autodetection
+-# CROSS_COMPILE=true
++CROSS_COMPILE=true
+ 
+ ifeq ($(CROSS_COMPILE),)
+ MYSQLCFG=$(shell which mysql_config)
diff --git a/pkg/kamailio/freebsd/files/patch-Makefile.defs b/pkg/kamailio/freebsd/files/patch-Makefile.defs
new file mode 100644
index 0000000..87a111a
--- /dev/null
+++ b/pkg/kamailio/freebsd/files/patch-Makefile.defs
@@ -0,0 +1,42 @@
+--- Makefile.defs.orig	Thu Dec 13 18:56:53 2007
++++ Makefile.defs	Thu Dec 13 20:31:40 2007
+@@ -135,7 +135,7 @@
+ ifeq ($(ARCH_B),64b)
+ 	LIBDIR ?= lib64
+ else
+-	LIBDIR ?= lib
++	LIBDIR = lib
+ 	# assume 32b - it is not really used further
+ 	ARCH_B=32b
+ endif
+@@ -228,13 +228,13 @@
+ TAR ?= tar
+ endif
+ 
+-INSTALL_TOUCH = touch          # used to create the file first (good to 
++INSTALL_TOUCH = :          # used to create the file first (good to 
+                                #  make solaris install work)
+-INSTALL_CFG = $(INSTALL) -m 644
+-INSTALL_BIN = $(INSTALL) -m 755
+-INSTALL_MODULES = $(INSTALL) -m 755
+-INSTALL_DOC = $(INSTALL) -m 644
+-INSTALL_MAN = $(INSTALL) -m 644
++INSTALL_CFG = $(BSD_INSTALL_DATA) -m 644
++INSTALL_BIN = $(BSD_INSTALL_PROGRAM) -m 755
++INSTALL_MODULES = $(BSD_INSTALL_PROGRAM) -m 755
++INSTALL_DOC = $(BSD_INSTALL_DATA) -m 644
++INSTALL_MAN = $(BSD_INSTALL_MAN) -m 644
+ 
+ #set some vars from the environment (and not make builtins)
+ CC   := $(shell echo "$${CC}")
+@@ -1254,8 +1254,8 @@
+ 
+ #add libssl if needed
+ ifneq ($(TLS),)
+-DEFS+= -I$(LOCALBASE)/ssl/include -I$(LOCALBASE)/include
+-LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl  -lcrypto
++DEFS+= -I$(OPENSSLINC)
++LIBS+= -L$(OPENSSLLIB) -lssl  -lcrypto
+ endif
+ 
+ #add libsctp if needed
diff --git a/pkg/kamailio/freebsd/files/pkg-deinstall.in b/pkg/kamailio/freebsd/files/pkg-deinstall.in
new file mode 100644
index 0000000..8cf7bab
--- /dev/null
+++ b/pkg/kamailio/freebsd/files/pkg-deinstall.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+rc_dir=$PKG_PREFIX/etc/kamailio/
+
+if [ "$2" = DEINSTALL ]; then
+	for f in %%RC_FILES%%; do
+		if /usr/bin/cmp -s $rc_dir/$f.default $rc_dir/$f; then
+			/bin/rm -f $rc_dir/$f
+		fi
+	done
+elif [ "$2" = POST-DEINSTALL ]; then
+	rc_dirs=`for d in %%RC_DIRS%%; do echo $d; done | /usr/bin/sort -r`
+
+	for d in $rc_dirs ""; do
+		/bin/rmdir $rc_dir/$d 2>/dev/null || /usr/bin/true
+	done
+
+	if [ -e $rc_dir ]; then
+		echo "==============================================================================="
+		echo "If you are permanently removing this port, you should manually remove the"
+		echo "$rc_dir directory."
+		echo "==============================================================================="
+	fi
+fi
diff --git a/pkg/kamailio/freebsd/files/pkg-install.in b/pkg/kamailio/freebsd/files/pkg-install.in
new file mode 100644
index 0000000..97680f6
--- /dev/null
+++ b/pkg/kamailio/freebsd/files/pkg-install.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ "$2" != POST-INSTALL ] && exit
+
+rc_dir=$PKG_PREFIX/etc/kamailio/
+
+for f in %%RC_FILES%%; do
+	if ! [ -e $rc_dir/$f ]; then
+		/usr/bin/install -o root -g wheel -m 644 \
+			$rc_dir/$f.default $rc_dir/$f
+	fi
+done
diff --git a/pkg/kamailio/freebsd/pkg-descr b/pkg/kamailio/freebsd/pkg-descr
new file mode 100644
index 0000000..9aad819
--- /dev/null
+++ b/pkg/kamailio/freebsd/pkg-descr
@@ -0,0 +1,13 @@
+Kamailio is a very fast and flexible SIP (RFC3261)
+proxy server. Written entirely in C, kamailio can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL and UNIXODBC support, a presence agent,
+radius authentication, record routing, an SMS gateway, a jabber gateway, a 
+transaction and dialog module, OSP module, statistics support, 
+registrar and user location, SIMPLE Presence, Perl programming interface,
+SNMP and Java SIP Servlet.
+
+WWW: http://www.kamailio.org/
diff --git a/pkg/kamailio/gentoo b/pkg/kamailio/gentoo
new file mode 120000
index 0000000..6cd8d42
--- /dev/null
+++ b/pkg/kamailio/gentoo
@@ -0,0 +1 @@
+../ser/gentoo/
\ No newline at end of file
diff --git a/pkg/kamailio/netbsd/COMMENT b/pkg/kamailio/netbsd/COMMENT
new file mode 100644
index 0000000..1d877c1
--- /dev/null
+++ b/pkg/kamailio/netbsd/COMMENT
@@ -0,0 +1 @@
+Kamailio, very fast and configurable SIP proxy
diff --git a/pkg/kamailio/netbsd/DESCR b/pkg/kamailio/netbsd/DESCR
new file mode 100644
index 0000000..5c77338
--- /dev/null
+++ b/pkg/kamailio/netbsd/DESCR
@@ -0,0 +1,18 @@
+Kamailio is a very fast and flexible SIP (RFC3261)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: Digest Authentication,
+CPL scripts, Instant Messaging, MySQL support, UNIXODBC support,
+OSP support, Radius Authentication, Record Routing, SMS Gateway,
+Jabber Gateway, Transaction Module, Dialog Module, Registrar and
+User Location, Perl programming interface, SIMPLE Presence and SNMP.
+
+
+WWW: http://www.kamailio.org/
+
+- Bogdan-Andrei Iancu
+bogdan at voice-system.ro
+- Daniel-Constantin Mierla
+miconda at gmail.com
diff --git a/pkg/kamailio/netbsd/Makefile b/pkg/kamailio/netbsd/Makefile
new file mode 100644
index 0000000..a5c62b0
--- /dev/null
+++ b/pkg/kamailio/netbsd/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for:    kamailio
+#
+# $NetBSD$
+#
+# $Id$
+#
+
+COMMENT= "Kamailio"
+
+PORTNAME= kamailio
+PORTVERSION= 1.2.0-notls
+CATEGORIES= net
+MASTER_SITES= http://kamailio.org/pub/kamailio/1.2.0/src/
+
+MAINTAINER= miconda at gmail.com
+
+MAN8=kamailio.8
+MAN5=kamailio.cfg.5
+# MANCOMPRESSED must not be specified (if defined is assumed to be yes)
+
+
+USE_GMAKE= yes
+USE_TOOLS+= gmake
+# we override the DISTFILE NAME
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+DISTFILES= ${DISTNAME}_src.tar.gz
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+# build by default mysql and jabber
+MAKE_ENV= include_modules="mysql jabber"
+
+# depends on expat and mysqlclient because of the above modules
+DEPENDS= expat-[0-9]*:../../textproc/expat \
+         mysql-client>=3.23.35:../../databases/mysql-client
+
+#.include "/usr/pkgsrc/mk/bsd.prefs.mk"
+
+pre-fetch:
+
+.include "../../mk/bsd.pkg.mk"
+
+
diff --git a/pkg/kamailio/netbsd/PLIST b/pkg/kamailio/netbsd/PLIST
new file mode 100644
index 0000000..8a25398
--- /dev/null
+++ b/pkg/kamailio/netbsd/PLIST
@@ -0,0 +1,120 @@
+etc/kamailio/kamailio.cfg
+etc/kamailio/kamctlrc
+sbin/kamailio
+sbin/kamctl
+sbin/kamailio_mysql.sh
+lib/kamailio/modules/acc.so
+lib/kamailio/modules/alias_db.so
+lib/kamailio/modules/auth.so
+lib/kamailio/modules/auth_db.so
+lib/kamailio/modules/auth_diameter.so
+lib/kamailio/modules/avpops.so
+lib/kamailio/modules/dbtext.so
+lib/kamailio/modules/dialog.so
+lib/kamailio/modules/dispatcher.so
+lib/kamailio/modules/diversion.so
+lib/kamailio/modules/domain.so
+lib/kamailio/modules/domainpolicy.so
+lib/kamailio/modules/enum.so
+lib/kamailio/modules/exec.so
+lib/kamailio/modules/flatstore.so
+lib/kamailio/modules/gflags.so
+lib/kamailio/modules/group.so
+lib/kamailio/modules/jabber.so
+lib/kamailio/modules/lcr.so
+lib/kamailio/modules/mangler.so
+lib/kamailio/modules/maxfwd.so
+lib/kamailio/modules/mediaproxy.so
+lib/kamailio/modules/mi_fifo.so
+lib/kamailio/modules/msilo.so
+lib/kamailio/modules/mysql.so
+lib/kamailio/modules/nathelper.so
+lib/kamailio/modules/options.so
+lib/kamailio/modules/pa.so
+lib/kamailio/modules/path.so
+lib/kamailio/modules/pdt.so
+lib/kamailio/modules/permissions.so
+lib/kamailio/modules/pike.so
+lib/kamailio/modules/registrar.so
+lib/kamailio/modules/rr.so
+lib/kamailio/modules/seas.so
+lib/kamailio/modules/siptrace.so
+lib/kamailio/modules/sl.so
+lib/kamailio/modules/sms.so
+lib/kamailio/modules/speeddial.so
+lib/kamailio/modules/sst.so
+lib/kamailio/modules/statistics.so
+lib/kamailio/modules/textops.so
+lib/kamailio/modules/tm.so
+lib/kamailio/modules/uac.so
+lib/kamailio/modules/uac_redirect.so
+lib/kamailio/modules/uri.so
+lib/kamailio/modules/uri_db.so
+lib/kamailio/modules/usrloc.so
+lib/kamailio/modules/xlog.so
+lib/kamailio/modules/xmpp.so
+lib/kamctl/kamctl.base
+lib/kamctl/kamctl.sqlbase
+lib/kamctl/kamctl.ctlbase
+lib/kamctl/kamctl.fifo
+lib/kamctl/kamctl.unixsock
+lib/kamctl/kamctl.mysql
+share/doc/kamailio/README
+share/doc/kamailio/INSTALL
+share/doc/kamailio/README-MODULES
+share/doc/kamailio/AUTHORS
+share/doc/kamailio/NEWS
+share/doc/kamailio/README.acc
+share/doc/kamailio/README.alias_db
+share/doc/kamailio/README.auth
+share/doc/kamailio/README.auth_db
+share/doc/kamailio/README.auth_diameter
+share/doc/kamailio/README.avpops
+share/doc/kamailio/README.dbtext
+share/doc/kamailio/README.dialog
+share/doc/kamailio/README.dispatcher
+share/doc/kamailio/README.diversion
+share/doc/kamailio/README.domain
+share/doc/kamailio/README.domainpolicy
+share/doc/kamailio/README.enum
+share/doc/kamailio/README.exec
+share/doc/kamailio/README.flatstore
+share/doc/kamailio/README.gflags
+share/doc/kamailio/README.group
+share/doc/kamailio/README.jabber
+share/doc/kamailio/README.lcr
+share/doc/kamailio/README.mangler
+share/doc/kamailio/README.maxfwd
+share/doc/kamailio/README.mediaproxy
+share/doc/kamailio/README.mi_fifo
+share/doc/kamailio/README.msilo
+share/doc/kamailio/README.mysql
+share/doc/kamailio/README.nathelper
+share/doc/kamailio/README.options
+share/doc/kamailio/README.pa
+share/doc/kamailio/README.path
+share/doc/kamailio/README.pdt
+share/doc/kamailio/README.permissions
+share/doc/kamailio/README.pike
+share/doc/kamailio/README.registrar
+share/doc/kamailio/README.rr
+share/doc/kamailio/README.seas
+share/doc/kamailio/README.siptrace
+share/doc/kamailio/README.sl
+share/doc/kamailio/README.sms
+share/doc/kamailio/README.speeddial
+share/doc/kamailio/README.sst
+share/doc/kamailio/README.statistics
+share/doc/kamailio/README.textops
+share/doc/kamailio/README.tm
+share/doc/kamailio/README.uac
+share/doc/kamailio/README.uac_redirect
+share/doc/kamailio/README.uri
+share/doc/kamailio/README.uri_db
+share/doc/kamailio/README.usrloc
+share/doc/kamailio/README.xlog
+share/doc/kamailio/README.xmpp
+ at dirrm share/doc/kamailio
+ at dirrm etc/kamailio
+ at dirrm lib/kamailio/modules
+ at dirrm lib/kamailio
diff --git a/pkg/kamailio/netbsd/distinfo b/pkg/kamailio/netbsd/distinfo
new file mode 100644
index 0000000..187f898
--- /dev/null
+++ b/pkg/kamailio/netbsd/distinfo
@@ -0,0 +1 @@
+MD5 (kamailio-1.2.0-notls_src.tar.gz) = 9ca396cb5d95623206b109bdfb4c6374
diff --git a/pkg/kamailio/openbsd/Makefile b/pkg/kamailio/openbsd/Makefile
new file mode 100644
index 0000000..cf481de
--- /dev/null
+++ b/pkg/kamailio/openbsd/Makefile
@@ -0,0 +1,154 @@
+# $OpenBSD$
+
+COMMENT-main =		mature and flexible open source SIP server
+COMMENT-postgresql =	kamailio postgresql module
+COMMENT-mysql =		kamailio mysql module
+COMMENT-radius =	kamailio RADIUS modules
+COMMENT-berkeleydb =	kamailio berkeley DB module
+COMMENT-ldap =		kamailio LDAP modules
+COMMENT-xmlrpc =	kamailio XML-RPC module
+COMMENT-xcap_client =	kamailio XCAP client module
+COMMENT-carrierroute =	kamailio carrierroute module
+COMMENT-snmpstats =	kamailio snmpstats module
+COMMENT-perl =		kamailio perl modules
+
+VERSION =		1.5.0
+DISTNAME =		kamailio-${VERSION}
+PKGNAME-main =		kamailio-${VERSION}
+PKGNAME-mysql =		kamailio-mysql-${VERSION}
+PKGNAME-postgresql =	kamailio-postgresql-${VERSION}
+PKGNAME-radius =	kamailio-radius-${VERSION}
+PKGNAME-berkeleydb =	kamailio-berkeleydb-${VERSION}
+PKGNAME-ldap =		kamailio-ldap-${VERSION}
+PKGNAME-xmlrpc =	kamailio-xmlrpc-${VERSION}
+PKGNAME-xcap_client =	kamailio-xcap_client-${VERSION}
+PKGNAME-carrierroute =	kamailio-carrierroute-${VERSION}
+PKGNAME-snmpstats =	kamailio-snmpstats-${VERSION}
+PKGNAME-perl =		kamailio-perl-${VERSION}
+
+CATEGORIES =		telephony
+MAINTAINER =		port-pkg-maint at clark-communications.com
+
+HOMEPAGE =		http://www.kamailio.org/
+
+# GPL
+PERMIT_PACKAGE_CDROM =	Yes
+PERMIT_PACKAGE_FTP =	Yes
+PERMIT_DISTFILES_CDROM =Yes
+PERMIT_DISTFILES_FTP =	Yes
+
+MASTER_SITES =		http://www.kamailio.org/pub/kamailio/${VERSION}/src/
+DISTFILES =		${DISTNAME}-tls_src.tar.gz
+WRKDIST =		${WRKDIR}/${DISTNAME}-tls
+
+BUILD_DEPENDS =		::devel/gmake
+
+WANTLIB-main =		c expat crypto ssl
+LIB_DEPENDS-main =	xml2::textproc/libxml,-main,no_python
+# kamctl and kamdbctl use bash
+RUN_DEPENDS-main =	::shells/bash
+
+WANTLIB-berkeleydb =	c
+LIB_DEPENDS-berkeleydb =db::databases/db/v4,-main
+RUN_DEPENDS-berkeleydb =::telephony/kamailio
+
+LIB_DEPENDS-postgresql =pq:postgresql-client-*:databases/postgresql,-main
+RUN_DEPENDS-postgresql =::telephony/kamailio
+
+WANTLIB-mysql =		crypto m ssl z
+LIB_DEPENDS-mysql =	mysqlclient:mysql-client-*:databases/mysql,-main
+RUN_DEPENDS-mysql =	::telephony/kamailio
+
+LIB_DEPENDS-radius =	radiusclient-ng:radiusclient-ng-*:net/radiusclient-ng
+RUN_DEPENDS-radius =	::telephony/kamailio
+
+LIB_DEPENDS-ldap =	ldap:openldap-client-*:databases/openldap,-main
+RUN_DEPENDS-ldap =	::telephony/kamailio
+
+LIB_DEPENDS-xmlrpc =	xmlrpc::net/xmlrpc-c \
+			xmlrpc_server::net/xmlrpc-c \
+			xmlrpc_util::net/xmlrpc-c \
+			xmlrpc_xmlparse::net/xmlrpc-c \
+			xmlrpc_xmltok::net/xmlrpc-c
+RUN_DEPENDS-xmlrpc =	::telephony/kamailio
+
+LIB_DEPENDS-xcap_client =	curl::net/curl \
+				xml2::textproc/libxml,-main
+RUN_DEPENDS-xcap_client =	::telephony/kamailio
+
+LIB_DEPENDS-carrierroute =	confuse::devel/libconfuse
+RUN_DEPENDS-carrierroute =	::telephony/kamailio
+
+WANTLIB-snmpstats =	c m perl util
+LIB_DEPENDS-snmpstats =	netsnmp:net-snmp-*:net/net-snmp \
+			netsnmpagent:net-snmp-*:net/net-snmp \
+			netsnmphelpers:net-snmp-*:net/net-snmp
+RUN_DEPENDS-snmpstats =	::telephony/kamailio
+
+RUN_DEPENDS-perl =	::telephony/kamailio \
+			::databases/p5-ldap
+WANTLIB-perl =		c m perl util
+
+PSEUDO_FLAVORS =	no_berkeleydb no_postgresql no_mysql no_radius no_ldap no_xmlrpc no_xcap_client no_carrierroute no_snmpstats no_perl
+
+KAMAILIO_MODULES =	cpl-c jabber presence presence_mwi presence_xml pua pua_bla pua_mi pua_usrloc pua_xmpp rls seas xmpp
+FLAVOR ?=
+MULTI_PACKAGES =	-main
+
+.if !${FLAVOR:L:Mno_berkeleydb}
+MULTI_PACKAGES +=	-berkeleydb
+KAMAILIO_MODULES +=	db_berkeley
+.endif
+.if !${FLAVOR:L:Mno_postgresql}
+MULTI_PACKAGES +=	-postgresql
+KAMAILIO_MODULES +=	db_postgres
+.endif
+.if !${FLAVOR:L:Mno_mysql}
+MULTI_PACKAGES +=	-mysql
+KAMAILIO_MODULES +=	db_mysql
+.endif
+.if !${FLAVOR:L:Mno_radius}
+MULTI_PACKAGES +=	-radius
+KAMAILIO_MODULES +=	avp_radius auth_radius group_radius uri_radius peering
+.endif
+.if !${FLAVOR:L:Mno_ldap}
+MULTI_PACKAGES +=	-ldap
+KAMAILIO_MODULES +=	ldap h350
+.endif
+.if !${FLAVOR:L:Mno_xmlrpc}
+MULTI_PACKAGES +=	-xmlrpc
+KAMAILIO_MODULES +=	mi_xmlrpc
+.endif
+.if !${FLAVOR:L:Mno_xcap_client}
+MULTI_PACKAGES +=	-xcap_client
+KAMAILIO_MODULES +=	xcap_client
+.endif
+.if !${FLAVOR:L:Mno_snmpstats}
+MULTI_PACKAGES +=	-snmpstats
+KAMAILIO_MODULES +=	snmpstats
+.endif
+.if !${FLAVOR:L:Mno_carrierroute}
+MULTI_PACKAGES +=	-carrierroute
+KAMAILIO_MODULES +=	carrierroute
+.endif
+.if !${FLAVOR:L:Mno_perl}
+MULTI_PACKAGES +=	-perl
+KAMAILIO_MODULES +=	perl perlvdb
+.endif
+
+MAKE_FLAGS =		TLS=1 LIBDIR="lib" cfg-prefix="${WRKINST}" cfg-target="/etc/kamailio/" include_modules="${KAMAILIO_MODULES}"
+FAKE_FLAGS =		PREFIX=${PREFIX}
+USE_GMAKE =		Yes
+CONFIGURE_STYLE =	none
+DESTDIRNAME=BASEDIR
+NO_REGRESS =		Yes
+
+post-patch:
+.for f in kamctl kamdbctl
+	@cp ${WRKDIST}/scripts/${f} ${WRKDIST}/scripts/${f}.bak
+	@sed -e '1s,^#!/bin/bash,#!/usr/local/bin/bash,' ${WRKDIST}/scripts/${f}.bak > ${WRKDIST}/scripts/${f}
+.endfor
+
+post-install:
+	mv ${WRKINST}${SYSCONFDIR}/kamailio ${WRKINST}${LOCALBASE}/share/examples
+.include <bsd.port.mk>
diff --git a/pkg/kamailio/openbsd/distinfo b/pkg/kamailio/openbsd/distinfo
new file mode 100644
index 0000000..74b177e
--- /dev/null
+++ b/pkg/kamailio/openbsd/distinfo
@@ -0,0 +1,5 @@
+MD5 (kamailio-1.5.0-tls_src.tar.gz) = 
+RMD160 (kamailio-1.5.0-tls_src.tar.gz) = 
+SHA1 (kamailio-1.5.0-tls_src.tar.gz) = 
+SHA256 (kamailio-1.5.0-tls_src.tar.gz) = 
+SIZE (kamailio-1.5.0-tls_src.tar.gz) = 
diff --git a/pkg/kamailio/openbsd/patches/patch-etc_kamailio_cfg b/pkg/kamailio/openbsd/patches/patch-etc_kamailio_cfg
new file mode 100644
index 0000000..e029aa4
--- /dev/null
+++ b/pkg/kamailio/openbsd/patches/patch-etc_kamailio_cfg
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- etc/kamailio.cfg.orig	Thu Oct 23 19:32:11 2008
++++ etc/kamailio.cfg	Thu Oct 23 19:33:14 2008
+@@ -18,6 +18,9 @@ log_facility=LOG_LOCAL0
+ fork=yes
+ children=4
+ 
++user="_kamailio"
++group="_kamailio"
++
+ /* uncomment the following lines to enable debugging */
+ #debug=6
+ #fork=no
diff --git a/pkg/kamailio/openbsd/patches/patch-modules_perl_Makefile b/pkg/kamailio/openbsd/patches/patch-modules_perl_Makefile
new file mode 100644
index 0000000..a8cb64f
--- /dev/null
+++ b/pkg/kamailio/openbsd/patches/patch-modules_perl_Makefile
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- modules/perl/Makefile.orig	Thu Oct 23 12:04:58 2008
++++ modules/perl/Makefile	Mon Nov  3 21:33:22 2008
+@@ -5,6 +5,11 @@
+ # 
+ # WARNING: do not run this directly, it should be run by the master Makefile
+ 
++# Force inclusion due to bug in gmake 3.81 on OpenBSD which causes the 
++# "export" command to fail when the variable name contains hyphens. (!)
++ifeq ($(OS),openbsd)
++	makefile_defs=0
++endif
+ include ../../Makefile.defs
+ auto_gen=
+ NAME=perl.so
diff --git a/pkg/kamailio/openbsd/patches/patch-scripts_kamctlrc b/pkg/kamailio/openbsd/patches/patch-scripts_kamctlrc
new file mode 100644
index 0000000..c61e9c1
--- /dev/null
+++ b/pkg/kamailio/openbsd/patches/patch-scripts_kamctlrc
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- scripts/kamctlrc.orig	Thu Oct 23 12:04:49 2008
++++ scripts/kamctlrc	Mon Nov  3 20:15:24 2008
+@@ -135,7 +135,7 @@
+ 
+ ## OPENSER START Options
+ ## PID file path - default is: /var/run/kamailio.pid
+-# PID_FILE=/var/run/kamailio.pid
++PID_FILE=/var/kamailio/kamailio.pid
+ 
+ ## Extra start options - default is: not set
+ # example: start Kamailio with 64MB share memory: STARTOPTIONS="-m 64"
diff --git a/pkg/kamailio/openbsd/pkg/COMMENT b/pkg/kamailio/openbsd/pkg/COMMENT
new file mode 100644
index 0000000..1d877c1
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/COMMENT
@@ -0,0 +1 @@
+Kamailio, very fast and configurable SIP proxy
diff --git a/pkg/kamailio/openbsd/pkg/DESCR b/pkg/kamailio/openbsd/pkg/DESCR
new file mode 100644
index 0000000..28b5a4e
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR
@@ -0,0 +1,18 @@
+Kamailio is a very fast and flexible SIP (RFC3261)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: Digest Authentication,
+CPL scripts, Instant Messaging, MySQL support, UNIXODBC support,
+OSP support, Radius Authentication, Record Routing, SMS Gateway,
+Jabber Gateway, Transaction Module, Dialog Module, Registrar and
+User Location, SIMPLE Presence, Perl programming interface, SNMP.
+
+
+WWW: http://www.kamailio.org/
+
+- Bogdan-Andrei Iancu
+bogdan at voice-system.ro
+- Daniel-Constantin Mierla
+miconda at gmail.com
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-berkeleydb b/pkg/kamailio/openbsd/pkg/DESCR-berkeleydb
new file mode 100644
index 0000000..7a88cab
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-berkeleydb
@@ -0,0 +1 @@
+kamailio berkeley DB module
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-carrierroute b/pkg/kamailio/openbsd/pkg/DESCR-carrierroute
new file mode 100644
index 0000000..e23d971
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-carrierroute
@@ -0,0 +1 @@
+kamailio carrierroute module
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-ldap b/pkg/kamailio/openbsd/pkg/DESCR-ldap
new file mode 100644
index 0000000..6746432
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-ldap
@@ -0,0 +1 @@
+kamailio LDAP modules
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-main b/pkg/kamailio/openbsd/pkg/DESCR-main
new file mode 100644
index 0000000..9e82766
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-main
@@ -0,0 +1,7 @@
+KAMAILIO (OpenSER) is a mature and flexible open source SIP server (RFC3261).
+It can be used on systems with limitted resources as well as on carrier grade
+servers, scaling to up to thousands call setups per second. It is written in
+pure C for Unix/Linux-like systems with architecture specific optimizations to
+offer high performances. It is customizable, being able to feature as fast load
+balancer; SIP server flavours: registrar, location server, proxy server,
+redirect server; gateway to SMS/XMPP; or advanced VoIP application server.
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-mysql b/pkg/kamailio/openbsd/pkg/DESCR-mysql
new file mode 100644
index 0000000..129e0d0
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-mysql
@@ -0,0 +1 @@
+kamailio mysql module
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-perl b/pkg/kamailio/openbsd/pkg/DESCR-perl
new file mode 100644
index 0000000..0da43d5
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-perl
@@ -0,0 +1 @@
+kamailio perl modules
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-postgresql b/pkg/kamailio/openbsd/pkg/DESCR-postgresql
new file mode 100644
index 0000000..463e6fe
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-postgresql
@@ -0,0 +1 @@
+kamailio postgresql module
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-radius b/pkg/kamailio/openbsd/pkg/DESCR-radius
new file mode 100644
index 0000000..82c4c61
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-radius
@@ -0,0 +1 @@
+kamailio RADIUS modules
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-snmpstats b/pkg/kamailio/openbsd/pkg/DESCR-snmpstats
new file mode 100644
index 0000000..ef05fe3
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-snmpstats
@@ -0,0 +1 @@
+kamailio snmpstats module
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-xcap_client b/pkg/kamailio/openbsd/pkg/DESCR-xcap_client
new file mode 100644
index 0000000..3244704
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-xcap_client
@@ -0,0 +1 @@
+kamailio XCAP client module
diff --git a/pkg/kamailio/openbsd/pkg/DESCR-xmlrpc b/pkg/kamailio/openbsd/pkg/DESCR-xmlrpc
new file mode 100644
index 0000000..5a4caed
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/DESCR-xmlrpc
@@ -0,0 +1 @@
+kamailio XML-RPC module
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-berkeleydb b/pkg/kamailio/openbsd/pkg/PFRAG.shared-berkeleydb
new file mode 100644
index 0000000..1edf730
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-berkeleydb
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/db_berkeley.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-carrierroute b/pkg/kamailio/openbsd/pkg/PFRAG.shared-carrierroute
new file mode 100644
index 0000000..fcfb37c
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-carrierroute
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/carrierroute.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-ldap b/pkg/kamailio/openbsd/pkg/PFRAG.shared-ldap
new file mode 100644
index 0000000..f5c0968
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-ldap
@@ -0,0 +1,3 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/h350.so
+lib/kamailio/modules/ldap.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-main b/pkg/kamailio/openbsd/pkg/PFRAG.shared-main
new file mode 100644
index 0000000..99345bf
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-main
@@ -0,0 +1,68 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/acc.so
+lib/kamailio/modules/alias_db.so
+lib/kamailio/modules/auth.so
+lib/kamailio/modules/auth_db.so
+lib/kamailio/modules/auth_diameter.so
+lib/kamailio/modules/avpops.so
+lib/kamailio/modules/benchmark.so
+lib/kamailio/modules/cfgutils.so
+lib/kamailio/modules/cpl-c.so
+lib/kamailio/modules/db_flatstore.so
+lib/kamailio/modules/db_text.so
+lib/kamailio/modules/dialog.so
+lib/kamailio/modules/dialplan.so
+lib/kamailio/modules/dispatcher.so
+lib/kamailio/modules/diversion.so
+lib/kamailio/modules/domain.so
+lib/kamailio/modules/domainpolicy.so
+lib/kamailio/modules/enum.so
+lib/kamailio/modules/exec.so
+lib/kamailio/modules/gflags.so
+lib/kamailio/modules/group.so
+lib/kamailio/modules/imc.so
+lib/kamailio/modules/jabber.so
+lib/kamailio/modules/lcr.so
+lib/kamailio/modules/mangler.so
+lib/kamailio/modules/maxfwd.so
+lib/kamailio/modules/mediaproxy.so
+lib/kamailio/modules/mi_datagram.so
+lib/kamailio/modules/mi_fifo.so
+lib/kamailio/modules/msilo.so
+lib/kamailio/modules/nat_traversal.so
+lib/kamailio/modules/nathelper.so
+lib/kamailio/modules/options.so
+lib/kamailio/modules/path.so
+lib/kamailio/modules/pdt.so
+lib/kamailio/modules/permissions.so
+lib/kamailio/modules/pike.so
+lib/kamailio/modules/presence.so
+lib/kamailio/modules/presence_mwi.so
+lib/kamailio/modules/presence_xml.so
+lib/kamailio/modules/pua.so
+lib/kamailio/modules/pua_bla.so
+lib/kamailio/modules/pua_mi.so
+lib/kamailio/modules/pua_usrloc.so
+lib/kamailio/modules/pua_xmpp.so
+lib/kamailio/modules/ratelimit.so
+lib/kamailio/modules/registrar.so
+lib/kamailio/modules/rls.so
+lib/kamailio/modules/rr.so
+lib/kamailio/modules/seas.so
+lib/kamailio/modules/siptrace.so
+lib/kamailio/modules/sl.so
+lib/kamailio/modules/sms.so
+lib/kamailio/modules/speeddial.so
+lib/kamailio/modules/sst.so
+lib/kamailio/modules/statistics.so
+lib/kamailio/modules/textops.so
+lib/kamailio/modules/tlsops.so
+lib/kamailio/modules/tm.so
+lib/kamailio/modules/uac.so
+lib/kamailio/modules/uac_redirect.so
+lib/kamailio/modules/uri.so
+lib/kamailio/modules/uri_db.so
+lib/kamailio/modules/userblacklist.so
+lib/kamailio/modules/usrloc.so
+lib/kamailio/modules/xlog.so
+lib/kamailio/modules/xmpp.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-mysql b/pkg/kamailio/openbsd/pkg/PFRAG.shared-mysql
new file mode 100644
index 0000000..6d8b175
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-mysql
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/db_mysql.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-perl b/pkg/kamailio/openbsd/pkg/PFRAG.shared-perl
new file mode 100644
index 0000000..8c57e4f
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-perl
@@ -0,0 +1,3 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/perl.so
+lib/kamailio/modules/perlvdb.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-postgresql b/pkg/kamailio/openbsd/pkg/PFRAG.shared-postgresql
new file mode 100644
index 0000000..bd8c414
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-postgresql
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/db_postgres.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-radius b/pkg/kamailio/openbsd/pkg/PFRAG.shared-radius
new file mode 100644
index 0000000..8a6b266
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-radius
@@ -0,0 +1,6 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/auth_radius.so
+lib/kamailio/modules/avp_radius.so
+lib/kamailio/modules/group_radius.so
+lib/kamailio/modules/peering.so
+lib/kamailio/modules/uri_radius.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-snmpstats b/pkg/kamailio/openbsd/pkg/PFRAG.shared-snmpstats
new file mode 100644
index 0000000..418ff26
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-snmpstats
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/snmpstats.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-xcap_client b/pkg/kamailio/openbsd/pkg/PFRAG.shared-xcap_client
new file mode 100644
index 0000000..f6ff6ab
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-xcap_client
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/xcap_client.so
diff --git a/pkg/kamailio/openbsd/pkg/PFRAG.shared-xmlrpc b/pkg/kamailio/openbsd/pkg/PFRAG.shared-xmlrpc
new file mode 100644
index 0000000..d73582b
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PFRAG.shared-xmlrpc
@@ -0,0 +1,2 @@
+ at comment $OpenBSD$
+lib/kamailio/modules/mi_xmlrpc.so
diff --git a/pkg/kamailio/openbsd/pkg/PLIST b/pkg/kamailio/openbsd/pkg/PLIST
new file mode 100644
index 0000000..f08ff47
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST
@@ -0,0 +1,120 @@
+etc/kamailio/kamailio.cfg
+etc/kamailio/kamctl
+sbin/kamailio
+sbin/kamctl
+sbin/kamailio_mysql.sh
+lib/kamailio/modules/acc.so
+lib/kamailio/modules/alias_db.so
+lib/kamailio/modules/auth.so
+lib/kamailio/modules/auth_db.so
+lib/kamailio/modules/auth_diameter.so
+lib/kamailio/modules/avpops.so
+lib/kamailio/modules/dbtext.so
+lib/kamailio/modules/dialog.so
+lib/kamailio/modules/dispatcher.so
+lib/kamailio/modules/diversion.so
+lib/kamailio/modules/domain.so
+lib/kamailio/modules/domainpolicy.so
+lib/kamailio/modules/enum.so
+lib/kamailio/modules/exec.so
+lib/kamailio/modules/flatstore.so
+lib/kamailio/modules/gflags.so
+lib/kamailio/modules/group.so
+lib/kamailio/modules/jabber.so
+lib/kamailio/modules/lcr.so
+lib/kamailio/modules/mangler.so
+lib/kamailio/modules/maxfwd.so
+lib/kamailio/modules/mediaproxy.so
+lib/kamailio/modules/mi_fifo.so
+lib/kamailio/modules/msilo.so
+lib/kamailio/modules/mysql.so
+lib/kamailio/modules/nathelper.so
+lib/kamailio/modules/options.so
+lib/kamailio/modules/pa.so
+lib/kamailio/modules/path.so
+lib/kamailio/modules/pdt.so
+lib/kamailio/modules/permissions.so
+lib/kamailio/modules/pike.so
+lib/kamailio/modules/registrar.so
+lib/kamailio/modules/rr.so
+lib/kamailio/modules/seas.so
+lib/kamailio/modules/siptrace.so
+lib/kamailio/modules/sl.so
+lib/kamailio/modules/sms.so
+lib/kamailio/modules/speeddial.so
+lib/kamailio/modules/sst.so
+lib/kamailio/modules/statistics.so
+lib/kamailio/modules/textops.so
+lib/kamailio/modules/tm.so
+lib/kamailio/modules/uac.so
+lib/kamailio/modules/uac_redirect.so
+lib/kamailio/modules/uri.so
+lib/kamailio/modules/uri_db.so
+lib/kamailio/modules/usrloc.so
+lib/kamailio/modules/xlog.so
+lib/kamailio/modules/xmpp.so
+lib/kamctl/kamctl.base
+lib/kamctl/kamctl.sqlbase
+lib/kamctl/kamctl.ctlbase
+lib/kamctl/kamctl.fifo
+lib/kamctl/kamctl.unixsock
+lib/kamctl/kamctl.mysql
+share/doc/kamailio/README
+share/doc/kamailio/INSTALL
+share/doc/kamailio/README-MODULES
+share/doc/kamailio/AUTHORS
+share/doc/kamailio/NEWS
+share/doc/kamailio/README.acc
+share/doc/kamailio/README.alias_db
+share/doc/kamailio/README.auth
+share/doc/kamailio/README.auth_db
+share/doc/kamailio/README.auth_diameter
+share/doc/kamailio/README.avpops
+share/doc/kamailio/README.dbtext
+share/doc/kamailio/README.dialog
+share/doc/kamailio/README.dispatcher
+share/doc/kamailio/README.diversion
+share/doc/kamailio/README.domain
+share/doc/kamailio/README.domainpolicy
+share/doc/kamailio/README.enum
+share/doc/kamailio/README.exec
+share/doc/kamailio/README.flatstore
+share/doc/kamailio/README.gflags
+share/doc/kamailio/README.group
+share/doc/kamailio/README.jabber
+share/doc/kamailio/README.lcr
+share/doc/kamailio/README.mangler
+share/doc/kamailio/README.maxfwd
+share/doc/kamailio/README.mediaproxy
+share/doc/kamailio/README.mi_fifo
+share/doc/kamailio/README.msilo
+share/doc/kamailio/README.mysql
+share/doc/kamailio/README.nathelper
+share/doc/kamailio/README.options
+share/doc/kamailio/README.pa
+share/doc/kamailio/README.path
+share/doc/kamailio/README.pdt
+share/doc/kamailio/README.permissions
+share/doc/kamailio/README.pike
+share/doc/kamailio/README.registrar
+share/doc/kamailio/README.rr
+share/doc/kamailio/README.seas
+share/doc/kamailio/README.siptrace
+share/doc/kamailio/README.sl
+share/doc/kamailio/README.sms
+share/doc/kamailio/README.speeddial
+share/doc/kamailio/README.statistics
+share/doc/kamailio/README.sst
+share/doc/kamailio/README.textops
+share/doc/kamailio/README.tm
+share/doc/kamailio/README.uac
+share/doc/kamailio/README.uac_redirect
+share/doc/kamailio/README.uri
+share/doc/kamailio/README.uri_db
+share/doc/kamailio/README.usrloc
+share/doc/kamailio/README.xlog
+share/doc/kamailio/README.xmpp
+ at dirrm share/doc/kamailio
+ at dirrm etc/kamailio
+ at dirrm lib/kamailio/modules
+ at dirrm lib/kamailio
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-berkeleydb b/pkg/kamailio/openbsd/pkg/PLIST-berkeleydb
new file mode 100644
index 0000000..e74c459
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-berkeleydb
@@ -0,0 +1,47 @@
+ at comment $OpenBSD$
+%%SHARED%%
+lib/kamailio/kamctl/kamctl.db_berkeley
+lib/kamailio/kamctl/kamdbctl.db_berkeley
+ at bin sbin/kambdb_recover
+share/doc/kamailio/README.db_berkeley
+share/kamailio/db_berkeley/
+share/kamailio/db_berkeley/kamailio/
+share/kamailio/db_berkeley/kamailio/acc
+share/kamailio/db_berkeley/kamailio/active_watchers
+share/kamailio/db_berkeley/kamailio/address
+share/kamailio/db_berkeley/kamailio/aliases
+share/kamailio/db_berkeley/kamailio/carrierfailureroute
+share/kamailio/db_berkeley/kamailio/carrierroute
+share/kamailio/db_berkeley/kamailio/cpl
+share/kamailio/db_berkeley/kamailio/dbaliases
+share/kamailio/db_berkeley/kamailio/dialog
+share/kamailio/db_berkeley/kamailio/dialplan
+share/kamailio/db_berkeley/kamailio/dispatcher
+share/kamailio/db_berkeley/kamailio/domain
+share/kamailio/db_berkeley/kamailio/domainpolicy
+share/kamailio/db_berkeley/kamailio/globalblacklist
+share/kamailio/db_berkeley/kamailio/grp
+share/kamailio/db_berkeley/kamailio/gw
+share/kamailio/db_berkeley/kamailio/imc_members
+share/kamailio/db_berkeley/kamailio/imc_rooms
+share/kamailio/db_berkeley/kamailio/lcr
+share/kamailio/db_berkeley/kamailio/location
+share/kamailio/db_berkeley/kamailio/missed_calls
+share/kamailio/db_berkeley/kamailio/pdt
+share/kamailio/db_berkeley/kamailio/presentity
+share/kamailio/db_berkeley/kamailio/pua
+share/kamailio/db_berkeley/kamailio/re_grp
+share/kamailio/db_berkeley/kamailio/rls_presentity
+share/kamailio/db_berkeley/kamailio/rls_watchers
+share/kamailio/db_berkeley/kamailio/route_tree
+share/kamailio/db_berkeley/kamailio/silo
+share/kamailio/db_berkeley/kamailio/sip_trace
+share/kamailio/db_berkeley/kamailio/speed_dial
+share/kamailio/db_berkeley/kamailio/subscriber
+share/kamailio/db_berkeley/kamailio/trusted
+share/kamailio/db_berkeley/kamailio/uri
+share/kamailio/db_berkeley/kamailio/userblacklist
+share/kamailio/db_berkeley/kamailio/usr_preferences
+share/kamailio/db_berkeley/kamailio/version
+share/kamailio/db_berkeley/kamailio/watchers
+share/kamailio/db_berkeley/kamailio/xcap
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-carrierroute b/pkg/kamailio/openbsd/pkg/PLIST-carrierroute
new file mode 100644
index 0000000..17958b1
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-carrierroute
@@ -0,0 +1,3 @@
+ at comment $OpenBSD$
+%%SHARED%%
+share/doc/kamailio/README.carrierroute
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-ldap b/pkg/kamailio/openbsd/pkg/PLIST-ldap
new file mode 100644
index 0000000..e3bfcfa
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-ldap
@@ -0,0 +1,4 @@
+ at comment $OpenBSD$
+%%SHARED%%
+share/doc/kamailio/README.h350
+share/doc/kamailio/README.ldap
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-main b/pkg/kamailio/openbsd/pkg/PLIST-main
new file mode 100644
index 0000000..82894b8
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-main
@@ -0,0 +1,186 @@
+ at comment $OpenBSD$
+ at newgroup _kamailio:610
+ at newuser _kamailio:610:610:daemon:Kamailio:/nonexistent:/sbin/nologin
+%%SHARED%%
+lib/kamailio/
+lib/kamailio/kamctl/
+lib/kamailio/kamctl/dbtextdb/
+lib/kamailio/kamctl/dbtextdb/dbtextdb.py
+lib/kamailio/kamctl/kamctl.base
+lib/kamailio/kamctl/kamctl.ctlbase
+lib/kamailio/kamctl/kamctl.dbtext
+lib/kamailio/kamctl/kamctl.fifo
+lib/kamailio/kamctl/kamctl.sqlbase
+lib/kamailio/kamctl/kamctl.unixsock
+lib/kamailio/kamctl/kamdbctl.base
+lib/kamailio/kamctl/kamdbctl.dbtext
+lib/kamailio/modules/
+ at man man/man5/kamailio.cfg.5
+ at man man/man8/kamailio.8
+ at man man/man8/kamctl.8
+ at man man/man8/kamunix.8
+ at bin sbin/kamailio
+sbin/kamctl
+sbin/kamdbctl
+ at bin sbin/kamunix
+share/doc/kamailio/
+share/doc/kamailio/AUTHORS
+share/doc/kamailio/INSTALL
+share/doc/kamailio/NEWS
+share/doc/kamailio/README
+share/doc/kamailio/README-MODULES
+share/doc/kamailio/README.acc
+share/doc/kamailio/README.alias_db
+share/doc/kamailio/README.auth
+share/doc/kamailio/README.auth_db
+share/doc/kamailio/README.auth_diameter
+share/doc/kamailio/README.avpops
+share/doc/kamailio/README.benchmark
+share/doc/kamailio/README.cfgutils
+share/doc/kamailio/README.cpl-c
+share/doc/kamailio/README.db_flatstore
+share/doc/kamailio/README.db_text
+share/doc/kamailio/README.dialog
+share/doc/kamailio/README.dialplan
+share/doc/kamailio/README.dispatcher
+share/doc/kamailio/README.diversion
+share/doc/kamailio/README.domain
+share/doc/kamailio/README.domainpolicy
+share/doc/kamailio/README.enum
+share/doc/kamailio/README.exec
+share/doc/kamailio/README.gflags
+share/doc/kamailio/README.group
+share/doc/kamailio/README.imc
+share/doc/kamailio/README.jabber
+share/doc/kamailio/README.lcr
+share/doc/kamailio/README.mangler
+share/doc/kamailio/README.maxfwd
+share/doc/kamailio/README.mediaproxy
+share/doc/kamailio/README.mi_datagram
+share/doc/kamailio/README.mi_fifo
+share/doc/kamailio/README.msilo
+share/doc/kamailio/README.nat_traversal
+share/doc/kamailio/README.nathelper
+share/doc/kamailio/README.options
+share/doc/kamailio/README.path
+share/doc/kamailio/README.pdt
+share/doc/kamailio/README.permissions
+share/doc/kamailio/README.pike
+share/doc/kamailio/README.presence
+share/doc/kamailio/README.presence_mwi
+share/doc/kamailio/README.presence_xml
+share/doc/kamailio/README.pua
+share/doc/kamailio/README.pua_bla
+share/doc/kamailio/README.pua_mi
+share/doc/kamailio/README.pua_usrloc
+share/doc/kamailio/README.pua_xmpp
+share/doc/kamailio/README.ratelimit
+share/doc/kamailio/README.registrar
+share/doc/kamailio/README.rls
+share/doc/kamailio/README.rr
+share/doc/kamailio/README.seas
+share/doc/kamailio/README.siptrace
+share/doc/kamailio/README.sl
+share/doc/kamailio/README.sms
+share/doc/kamailio/README.speeddial
+share/doc/kamailio/README.sst
+share/doc/kamailio/README.statistics
+share/doc/kamailio/README.textops
+share/doc/kamailio/README.tlsops
+share/doc/kamailio/README.tm
+share/doc/kamailio/README.uac
+share/doc/kamailio/README.uac_redirect
+share/doc/kamailio/README.uri
+share/doc/kamailio/README.uri_db
+share/doc/kamailio/README.userblacklist
+share/doc/kamailio/README.usrloc
+share/doc/kamailio/README.xlog
+share/doc/kamailio/README.xmpp
+share/examples/kamailio/
+ at sample ${SYSCONFDIR}/kamailio/
+share/examples/kamailio/kamailio.cfg
+ at sample ${SYSCONFDIR}/kamailio/kamailio.cfg
+share/examples/kamailio/kamctlrc
+ at sample ${SYSCONFDIR}/kamailio/kamctlrc
+share/examples/kamailio/tls/
+ at sample ${SYSCONFDIR}/kamailio/tls/
+share/examples/kamailio/tls/README
+ at sample ${SYSCONFDIR}/kamailio/tls/README
+share/examples/kamailio/tls/ca.conf
+ at sample ${SYSCONFDIR}/kamailio/tls/ca.conf
+share/examples/kamailio/tls/request.conf
+ at sample ${SYSCONFDIR}/kamailio/tls/request.conf
+share/examples/kamailio/tls/rootCA/
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/
+share/examples/kamailio/tls/rootCA/cacert.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/cacert.pem
+share/examples/kamailio/tls/rootCA/certs/
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/certs/
+share/examples/kamailio/tls/rootCA/certs/01.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/certs/01.pem
+share/examples/kamailio/tls/rootCA/index.txt
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/index.txt
+share/examples/kamailio/tls/rootCA/private/
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/private/
+share/examples/kamailio/tls/rootCA/private/cakey.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/private/cakey.pem
+share/examples/kamailio/tls/rootCA/serial
+ at sample ${SYSCONFDIR}/kamailio/tls/rootCA/serial
+share/examples/kamailio/tls/user/
+ at sample ${SYSCONFDIR}/kamailio/tls/user/
+share/examples/kamailio/tls/user.conf
+ at sample ${SYSCONFDIR}/kamailio/tls/user.conf
+share/examples/kamailio/tls/user/user-calist.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/user/user-calist.pem
+share/examples/kamailio/tls/user/user-cert.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/user/user-cert.pem
+share/examples/kamailio/tls/user/user-cert_req.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/user/user-cert_req.pem
+share/examples/kamailio/tls/user/user-privkey.pem
+ at sample ${SYSCONFDIR}/kamailio/tls/user/user-privkey.pem
+share/kamailio/
+share/kamailio/dbtext/
+share/kamailio/dbtext/kamailio/
+share/kamailio/dbtext/kamailio/acc
+share/kamailio/dbtext/kamailio/active_watchers
+share/kamailio/dbtext/kamailio/address
+share/kamailio/dbtext/kamailio/aliases
+share/kamailio/dbtext/kamailio/carrierfailureroute
+share/kamailio/dbtext/kamailio/carrierroute
+share/kamailio/dbtext/kamailio/cpl
+share/kamailio/dbtext/kamailio/dbaliases
+share/kamailio/dbtext/kamailio/dialog
+share/kamailio/dbtext/kamailio/dialplan
+share/kamailio/dbtext/kamailio/dispatcher
+share/kamailio/dbtext/kamailio/domain
+share/kamailio/dbtext/kamailio/domainpolicy
+share/kamailio/dbtext/kamailio/globalblacklist
+share/kamailio/dbtext/kamailio/grp
+share/kamailio/dbtext/kamailio/gw
+share/kamailio/dbtext/kamailio/imc_members
+share/kamailio/dbtext/kamailio/imc_rooms
+share/kamailio/dbtext/kamailio/lcr
+share/kamailio/dbtext/kamailio/location
+share/kamailio/dbtext/kamailio/missed_calls
+share/kamailio/dbtext/kamailio/pdt
+share/kamailio/dbtext/kamailio/presentity
+share/kamailio/dbtext/kamailio/pua
+share/kamailio/dbtext/kamailio/re_grp
+share/kamailio/dbtext/kamailio/rls_presentity
+share/kamailio/dbtext/kamailio/rls_watchers
+share/kamailio/dbtext/kamailio/route_tree
+share/kamailio/dbtext/kamailio/silo
+share/kamailio/dbtext/kamailio/sip_trace
+share/kamailio/dbtext/kamailio/speed_dial
+share/kamailio/dbtext/kamailio/subscriber
+share/kamailio/dbtext/kamailio/trusted
+share/kamailio/dbtext/kamailio/uri
+share/kamailio/dbtext/kamailio/userblacklist
+share/kamailio/dbtext/kamailio/usr_preferences
+share/kamailio/dbtext/kamailio/version
+share/kamailio/dbtext/kamailio/watchers
+share/kamailio/dbtext/kamailio/xcap
+ at mode 700
+ at owner _kamailio
+ at sample /var/kamailio/
+ at extraunexec rm -rf /var/kamailio/
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-mysql b/pkg/kamailio/openbsd/pkg/PLIST-mysql
new file mode 100644
index 0000000..bea158e
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-mysql
@@ -0,0 +1,32 @@
+ at comment $OpenBSD$
+%%SHARED%%
+lib/kamailio/kamctl/kamctl.mysql
+lib/kamailio/kamctl/kamdbctl.mysql
+share/doc/kamailio/README.db_mysql
+share/kamailio/mysql/
+share/kamailio/mysql/acc-create.sql
+share/kamailio/mysql/alias_db-create.sql
+share/kamailio/mysql/auth_db-create.sql
+share/kamailio/mysql/avpops-create.sql
+share/kamailio/mysql/carrierroute-create.sql
+share/kamailio/mysql/cpl-create.sql
+share/kamailio/mysql/dialog-create.sql
+share/kamailio/mysql/dialplan-create.sql
+share/kamailio/mysql/dispatcher-create.sql
+share/kamailio/mysql/domain-create.sql
+share/kamailio/mysql/domainpolicy-create.sql
+share/kamailio/mysql/group-create.sql
+share/kamailio/mysql/imc-create.sql
+share/kamailio/mysql/lcr-create.sql
+share/kamailio/mysql/msilo-create.sql
+share/kamailio/mysql/pdt-create.sql
+share/kamailio/mysql/permissions-create.sql
+share/kamailio/mysql/presence-create.sql
+share/kamailio/mysql/registrar-create.sql
+share/kamailio/mysql/rls-create.sql
+share/kamailio/mysql/siptrace-create.sql
+share/kamailio/mysql/speeddial-create.sql
+share/kamailio/mysql/standard-create.sql
+share/kamailio/mysql/uri_db-create.sql
+share/kamailio/mysql/userblacklist-create.sql
+share/kamailio/mysql/usrloc-create.sql
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-perl b/pkg/kamailio/openbsd/pkg/PLIST-perl
new file mode 100644
index 0000000..82386cc
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-perl
@@ -0,0 +1,30 @@
+ at comment $OpenBSD$
+%%SHARED%%
+lib/kamailio/perl/
+lib/kamailio/perl/OpenSER/
+lib/kamailio/perl/OpenSER.pm
+lib/kamailio/perl/OpenSER/Constants.pm
+lib/kamailio/perl/OpenSER/LDAPUtils/
+lib/kamailio/perl/OpenSER/LDAPUtils/LDAPConf.pm
+lib/kamailio/perl/OpenSER/LDAPUtils/LDAPConnection.pm
+lib/kamailio/perl/OpenSER/Message.pm
+lib/kamailio/perl/OpenSER/Utils/
+lib/kamailio/perl/OpenSER/Utils/Debug.pm
+lib/kamailio/perl/OpenSER/Utils/PhoneNumbers.pm
+lib/kamailio/perl/OpenSER/VDB/
+lib/kamailio/perl/OpenSER/VDB.pm
+lib/kamailio/perl/OpenSER/VDB/Adapter/
+lib/kamailio/perl/OpenSER/VDB/Adapter/AccountingSIPtrace.pm
+lib/kamailio/perl/OpenSER/VDB/Adapter/Alias.pm
+lib/kamailio/perl/OpenSER/VDB/Adapter/Auth.pm
+lib/kamailio/perl/OpenSER/VDB/Adapter/Describe.pm
+lib/kamailio/perl/OpenSER/VDB/Adapter/Speeddial.pm
+lib/kamailio/perl/OpenSER/VDB/Adapter/TableVersions.pm
+lib/kamailio/perl/OpenSER/VDB/Column.pm
+lib/kamailio/perl/OpenSER/VDB/Pair.pm
+lib/kamailio/perl/OpenSER/VDB/ReqCond.pm
+lib/kamailio/perl/OpenSER/VDB/Result.pm
+lib/kamailio/perl/OpenSER/VDB/VTab.pm
+lib/kamailio/perl/OpenSER/VDB/Value.pm
+share/doc/kamailio/README.perl
+share/doc/kamailio/README.perlvdb
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-postgresql b/pkg/kamailio/openbsd/pkg/PLIST-postgresql
new file mode 100644
index 0000000..b1b432e
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-postgresql
@@ -0,0 +1,32 @@
+ at comment $OpenBSD$
+%%SHARED%%
+lib/kamailio/kamctl/kamctl.pgsql
+lib/kamailio/kamctl/kamdbctl.pgsql
+share/doc/kamailio/README.db_postgres
+share/kamailio/postgres/
+share/kamailio/postgres/acc-create.sql
+share/kamailio/postgres/alias_db-create.sql
+share/kamailio/postgres/auth_db-create.sql
+share/kamailio/postgres/avpops-create.sql
+share/kamailio/postgres/carrierroute-create.sql
+share/kamailio/postgres/cpl-create.sql
+share/kamailio/postgres/dialog-create.sql
+share/kamailio/postgres/dialplan-create.sql
+share/kamailio/postgres/dispatcher-create.sql
+share/kamailio/postgres/domain-create.sql
+share/kamailio/postgres/domainpolicy-create.sql
+share/kamailio/postgres/group-create.sql
+share/kamailio/postgres/imc-create.sql
+share/kamailio/postgres/lcr-create.sql
+share/kamailio/postgres/msilo-create.sql
+share/kamailio/postgres/pdt-create.sql
+share/kamailio/postgres/permissions-create.sql
+share/kamailio/postgres/presence-create.sql
+share/kamailio/postgres/registrar-create.sql
+share/kamailio/postgres/rls-create.sql
+share/kamailio/postgres/siptrace-create.sql
+share/kamailio/postgres/speeddial-create.sql
+share/kamailio/postgres/standard-create.sql
+share/kamailio/postgres/uri_db-create.sql
+share/kamailio/postgres/userblacklist-create.sql
+share/kamailio/postgres/usrloc-create.sql
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-radius b/pkg/kamailio/openbsd/pkg/PLIST-radius
new file mode 100644
index 0000000..237e91d
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-radius
@@ -0,0 +1,8 @@
+ at comment $OpenBSD$
+%%SHARED%%
+share/doc/kamailio/README.auth_radius
+share/doc/kamailio/README.avp_radius
+share/doc/kamailio/README.group_radius
+share/doc/kamailio/README.peering
+share/doc/kamailio/README.uri_radius
+share/examples/kamailio/dictionary.radius
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-snmpstats b/pkg/kamailio/openbsd/pkg/PLIST-snmpstats
new file mode 100644
index 0000000..b2f0779
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-snmpstats
@@ -0,0 +1,10 @@
+ at comment $OpenBSD$
+%%SHARED%%
+share/doc/kamailio/README.snmpstats
+share/snmp/
+share/snmp/mibs/
+share/snmp/mibs/OPENSER-MIB
+share/snmp/mibs/OPENSER-REG-MIB
+share/snmp/mibs/OPENSER-SIP-COMMON-MIB
+share/snmp/mibs/OPENSER-SIP-SERVER-MIB
+share/snmp/mibs/OPENSER-TC
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-xcap_client b/pkg/kamailio/openbsd/pkg/PLIST-xcap_client
new file mode 100644
index 0000000..e20a9fb
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-xcap_client
@@ -0,0 +1,3 @@
+ at comment $OpenBSD$
+%%SHARED%%
+share/doc/kamailio/README.xcap_client
diff --git a/pkg/kamailio/openbsd/pkg/PLIST-xmlrpc b/pkg/kamailio/openbsd/pkg/PLIST-xmlrpc
new file mode 100644
index 0000000..94853a1
--- /dev/null
+++ b/pkg/kamailio/openbsd/pkg/PLIST-xmlrpc
@@ -0,0 +1,3 @@
+ at comment $OpenBSD$
+%%SHARED%%
+share/doc/kamailio/README.mi_xmlrpc
diff --git a/pkg/kamailio/rpm/kamailio.default b/pkg/kamailio/rpm/kamailio.default
new file mode 100644
index 0000000..90e6ca7
--- /dev/null
+++ b/pkg/kamailio/rpm/kamailio.default
@@ -0,0 +1,30 @@
+#
+# Kamailio startup options
+#
+
+# Set to yes to enable kamailio, once configured properly.
+RUN_KAMAILIO=yes
+
+# User to run as
+USER=kamailio
+
+# Group to run as
+GROUP=kamailio
+
+# Amount of shared memory to allocate for the running Kamailio server (in Mb)
+SHM_MEMORY=64
+
+# Amount of private memory to allocate for the running Kamailio server (in Mb)
+PKG_MEMORY=4
+
+# Enable the server to leave a core file when it crashes.
+# Set this to 'yes' to enable kamailio to leave a core file when it crashes
+# or 'no' to disable this feature. This option is case sensitive and only
+# accepts 'yes' and 'no' and only in lowercase letters.
+# On some systems (e.g. Ubuntu 6.10, Debian 4.0) it is necessary to specify
+# a directory for the core files to get a dump. Look into the kamailio
+# init file for an example configuration.
+DUMP_CORE=no
+
+# Add extra command line parameters in the EXTRA_OPTIONS variable
+# EXTRA_OPTIONS="-a no"
diff --git a/pkg/kamailio/rpm/kamailio.init b/pkg/kamailio/rpm/kamailio.init
new file mode 100644
index 0000000..cf76929
--- /dev/null
+++ b/pkg/kamailio/rpm/kamailio.init
@@ -0,0 +1,128 @@
+#!/bin/bash
+#
+# Startup script for Kamailio
+#
+# chkconfig: 345 85 15
+# description: Kamailio is a fast SIP Server.
+#
+# processname: kamailio
+# pidfile: /var/run/kamailio.pid
+# config: /etc/kamailio/kamailio.cfg
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+KAM=/usr/sbin/kamailio
+KAMCFG=/etc/kamailio/kamailio.cfg
+PROG=kamailio
+PID_FILE=/var/run/kamailio.pid
+LOCK_FILE=/var/lock/subsys/kamailio
+RETVAL=0
+DEFAULTS=/etc/default/kamailio
+RUN_KAMAILIO=no
+
+
+# Do not start kamailio if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+    if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $KAMCFG; then
+        echo "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead"
+        exit 1
+    fi
+}
+
+check_kamailio_config ()
+{
+        # Check if kamailio configuration is valid before starting the server
+        out=$($KAM -M $PKG_MEMORY -c 2>&1 > /dev/null)
+        retcode=$?
+        if [ "$retcode" != '0' ]; then
+            echo "Not starting $DESC: invalid configuration file!"
+            echo -e "\n$out\n"
+            exit 1
+        fi
+}
+
+
+start() {
+	check_kamailio_config
+        if [ "$1" != "debug" ]; then
+            check_fork
+        fi
+	echo -n $"Starting $PROG: "
+	daemon $KAM $OPTIONS >/dev/null 2>/dev/null
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && touch $LOCK_FILE && success
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $PROG: "
+	killproc $KAM
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f $LOCK_FILE $PID_FILE
+}
+
+# Load startup options if available
+if [ -f $DEFAULTS ]; then
+   . $DEFAULTS || true
+fi
+
+if [ "$RUN_KAMAILIO" != "yes" ]; then
+    echo "Kamailio not yet configured. Edit /etc/default/kamailio first."
+    exit 0
+fi
+
+
+SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`))
+PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`))
+[ -z "$USER" ]  && USER=kamailio
+[ -z "$GROUP" ] && GROUP=kamailio
+[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=32
+[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4
+
+if test "$DUMP_CORE" = "yes" ; then
+    # set proper ulimit
+    ulimit -c unlimited
+
+    # directory for the core dump files
+    # COREDIR=/home/corefiles
+    # [ -d $COREDIR ] || mkdir $COREDIR
+    # chmod 777 $COREDIR
+    # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+fi
+
+OPTIONS="-P $PID_FILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP $EXTRA_OPTIONS"
+
+
+# See how we were called.
+case "$1" in
+	start|debug)
+		start
+		;;
+	stop)
+		stop
+		;;
+	status)
+		status $KAM
+		RETVAL=$?
+		;;
+	restart)
+		stop
+		start
+		;;
+	condrestart)
+		if [ -f $PID_FILE ] ; then
+			stop
+			start
+		fi
+		;;
+	*)
+		echo $"Usage: $PROG {start|stop|restart|condrestart|status|debug|help}"
+		exit 1
+esac
+
+exit $RETVAL
diff --git a/pkg/kamailio/rpm/kamailio.init.SuSE b/pkg/kamailio/rpm/kamailio.init.SuSE
new file mode 100644
index 0000000..ac0f655
--- /dev/null
+++ b/pkg/kamailio/rpm/kamailio.init.SuSE
@@ -0,0 +1,133 @@
+#! /bin/sh
+# Copyright (c) 2002 FhG FOKUS, Germany.
+# All rights reserved.
+#
+# /etc/init.d/kamailio
+#
+### BEGIN INIT INFO
+# Provides:          sip
+# Required-Start:    $network
+# X-UnitedLinux-Should-Start: $network
+# Required-Stop:     $network
+# X-UnitedLinux-Should-Stop: $network
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Kamailio
+# Description:       Start Kamailio and provide the routing of SIP requests.
+### END INIT INFO
+
+
+# Check for missing binaries (stale symlinks should not happen)
+OSER_BIN=/usr/sbin/kamailio
+test -x $OSER_BIN || exit 5
+
+# Check for existence of needed config file and read it
+OSER_CONFIG=/etc/kamailio/kamailio.cfg
+test -r $OSER_CONFIG || exit 6
+
+# Shell functions sourced from /etc/rc.status:
+#      rc_check         check and set local and overall rc status
+#      rc_status        check and set local and overall rc status
+#      rc_status -v     ditto but be verbose in local rc status
+#      rc_status -v -r  ditto and clear the local rc status
+#      rc_status -s     display "skipped" and exit with status 3
+#      rc_status -u     display "unused" and exit with status 3
+#      rc_failed        set local and overall rc status to failed
+#      rc_failed <num>  set local and overall rc status to <num>
+#      rc_reset         clear local rc status (overall remains)
+#      rc_exit          exit appropriate to overall rc status
+#      rc_active	checks whether a service is activated by symlinks
+#      rc_splash arg    sets the boot splash screen to arg (if active)
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0	  - success
+# 1       - generic or unspecified error
+# 2       - invalid or excess argument(s)
+# 3       - unimplemented feature (e.g. "reload")
+# 4       - user had insufficient privileges
+# 5       - program is not installed
+# 6       - program is not configured
+# 7       - program is not running
+# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+# 
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+case "$1" in
+	start)
+		echo -n "Starting Kamailio "
+		## Start daemon with startproc(8). If this fails
+		## the return value is set appropriately by startproc.
+		startproc $OSER_BIN -f $OSER_CONFIG
+
+		# Remember status and be verbose
+		rc_status -v
+		;;
+	stop)
+		echo -n "Shutting down Kamailio "
+		## Stop daemon with killproc(8) and if this fails
+		## killproc sets the return value according to LSB.
+
+		killproc -TERM $OSER_BIN
+
+		# Remember status and be verbose
+		rc_status -v
+		;;
+	restart)
+		## Stop the service and regardless of whether it was
+		## running or not, start it again.
+		$0 stop
+		$0 start
+
+		# Remember status and be quiet
+		rc_status
+		;;
+	force-reload)
+		## Signal the daemon to reload its config. Most daemons
+		## do this on signal 1 (SIGHUP).
+		## If it does not support it, restart.
+
+		echo -n "Reload service Kamailio "
+		## Otherwise:
+		$0 stop  &&  $0 start
+		rc_status
+		;;
+	reload)
+		## Like force-reload, but if daemon does not support
+		## signaling, do nothing (!)
+
+		## Otherwise if it does not support reload:
+		rc_failed 3
+		rc_status -v
+		;;
+	status)
+		echo -n "Checking for service Kamailio "
+		## Check status with checkproc(8), if process is running
+		## checkproc will return with exit status 0.
+
+		# Return value is slightly different for the status command:
+		# 0 - service up and running
+		# 1 - service dead, but /var/run/  pid  file exists
+		# 2 - service dead, but /var/lock/ lock file exists
+		# 3 - service not running (unused)
+		# 4 - service status unknown :-(
+		# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
+
+		# NOTE: checkproc returns LSB compliant status values.
+		checkproc $OSER_BIN
+		# NOTE: rc_status knows that we called this init script with
+		# "status" option and adapts its messages accordingly.
+		rc_status -v
+		;;
+	*)
+		echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+		exit 1
+		;;
+esac
+rc_exit
diff --git a/pkg/kamailio/rpm/kamailio.spec-4.1 b/pkg/kamailio/rpm/kamailio.spec-4.1
new file mode 100644
index 0000000..3f0d7e5
--- /dev/null
+++ b/pkg/kamailio/rpm/kamailio.spec-4.1
@@ -0,0 +1,403 @@
+%define name    kamailio
+%define ver     4.1.4
+%define rel     0
+
+%define EXCLUDED_MODULES	mysql jabber cpl-c avp_radius auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc
+%define MYSQL_MODULES		mysql
+%define UNIXODBC_MODULES	unixodbc
+%define POSTGRES_MODULES	postgres
+%define JABBER_MODULES		jabber
+%define CPL_MODULES			cpl-c
+%define PA_MODULES			pa
+%define RADIUS_MODULES		avp_radius auth_radius group_radius uri_radius
+%define RADIUS_MOD_PATH		modules/avp_radius modules/auth_radius modules/group_radius modules/uri_radius
+
+Summary:      Kamailio, very fast and flexible SIP Proxy
+Name:         %name
+Version:      %ver
+Release:      %rel
+Packager:     Daniel-Constantin Mierla <miconda at gmail.com>
+Copyright:    GPL
+Group:        System Environment/Daemons
+Source:       http://kamailio.org/pub/kamailio/stable/%{name}-%{ver}_src.tar.gz
+Source2:      kamailio.init
+URL:          http://kamailio.org/
+Vendor:       kamailio.org
+BuildRoot:    /var/tmp/%{name}-%{ver}-root
+Conflicts:    kamailio-mysql < %ver, kamailio-jabber < %ver, kamailio-radius < %ver, kamailio-cpl < %ver, kamailio-unixodbc < %ver, kamailio-pa < %ver, kamailio-postgres < %ver
+BuildPrereq:  make flex bison
+
+
+%description
+Kamailio is a very fast and flexible SIP (RFC3261)
+proxy server. Written entirely in C, kamailio can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL and UNIXODBC support, a presence agent,
+radius authentication, record routing, an SMS gateway, a jabber gateway, a 
+transaction and dialog module, OSP module, statistics support, 
+registrar and user location, SNMP, SIMPLE Presence and Perl programming
+interface.
+
+%package  mysql
+Summary:  MySQL connectivity for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  mysql-devel zlib-devel
+
+%description mysql
+The kamailio-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  postgres
+Summary:  MPOSTGRES connectivity for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  postgresql-devel
+
+%description postgres
+The kamailio-postgres package contains Postgres database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  unixodbc
+Summary:  UNIXODBC connectivity for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  unixodbc-dev
+
+%description unixodbc
+The kamailio-unixodbc package contains UNIXODBC database connectivity support
+that is required by other modules with database dependencies.
+
+%package  jabber
+Summary:  sip jabber message translation support for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  expat-devel
+
+%description jabber
+The kamailio-jabber package contains a sip to jabber message translator.
+
+%%package  cpl
+Summary:  CPL interpreter engine for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  libxml2-dev
+
+%description cpl
+The kamailio-cpl package contains a SIP CPL interpreter engine.
+
+%package  pa
+Summary:  sip presence agent support for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  libxml2-dev
+
+%description pa
+The kamailio-pa package contains a sip Presence Agent.
+
+%package  radius
+Summary:  kamailio radius authentication, group and uri check modules.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  radiusclient-devel
+
+%description radius
+The kamailio-radius package contains modules for radius authentication, group
+ membership and uri checking.
+
+%prep
+%setup
+
+%build
+make all skip_modules="%EXCLUDED_MODULES"         cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%MYSQL_MODULES"     cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%POSTGRES_MODULES"  cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%UNIXODBC_MODULES"  cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%JABBER_MODULES"    cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%CPL_MODULES"       cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%PA_MODULES"        cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="%RADIUS_MOD_PATH"           cfg-target=/%{_sysconfdir}/kamailio/
+
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install skip_modules="%EXCLUDED_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="modules/%POSTGRES_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="modules/%POSTGRES_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="modules/%UNIXODBC_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="modules/%UNIXODBC_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="modules/%CPL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="modules/%CPL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="modules/%PA_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="modules/%PA_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-modules modules="%RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+make install-doc modules="%RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ 
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+install -m755 $RPM_SOURCE_DIR/kamailio.init \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/kamailio
+
+
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%post
+/sbin/chkconfig --add kamailio
+
+%preun
+if [ $1 = 0 ]; then
+    /sbin/service kamailio stop > /dev/null 2>&1
+    /sbin/chkconfig --del kamailio
+fi
+
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/kamailio
+%doc %{_docdir}/kamailio/AUTHORS
+%doc %{_docdir}/kamailio/NEWS
+%doc %{_docdir}/kamailio/INSTALL
+%doc %{_docdir}/kamailio/README
+%doc %{_docdir}/kamailio/README-MODULES
+%doc %{_docdir}/kamailio/README.acc
+%doc %{_docdir}/kamailio/README.alias_db
+%doc %{_docdir}/kamailio/README.auth
+%doc %{_docdir}/kamailio/README.auth_db
+%doc %{_docdir}/kamailio/README.auth_diameter
+%doc %{_docdir}/kamailio/README.avpops
+%doc %{_docdir}/kamailio/README.dbtext
+%doc %{_docdir}/kamailio/README.dialog
+%doc %{_docdir}/kamailio/README.dispatcher
+%doc %{_docdir}/kamailio/README.diversion
+%doc %{_docdir}/kamailio/README.domain
+%doc %{_docdir}/kamailio/README.enum
+%doc %{_docdir}/kamailio/README.exec
+%doc %{_docdir}/kamailio/README.flatstore
+%doc %{_docdir}/kamailio/README.gflags
+%doc %{_docdir}/kamailio/README.group
+%doc %{_docdir}/kamailio/README.lcr
+%doc %{_docdir}/kamailio/README.mangler
+%doc %{_docdir}/kamailio/README.maxfwd
+%doc %{_docdir}/kamailio/README.mediaproxy
+%doc %{_docdir}/kamailio/README.msilo
+%doc %{_docdir}/kamailio/README.nathelper
+%doc %{_docdir}/kamailio/README.options
+%doc %{_docdir}/kamailio/README.path
+%doc %{_docdir}/kamailio/README.pdt
+%doc %{_docdir}/kamailio/README.permissions
+%doc %{_docdir}/kamailio/README.pike
+%doc %{_docdir}/kamailio/README.registrar
+%doc %{_docdir}/kamailio/README.rr
+%doc %{_docdir}/kamailio/README.siptrace
+%doc %{_docdir}/kamailio/README.sl
+%doc %{_docdir}/kamailio/README.sms
+%doc %{_docdir}/kamailio/README.speeddial
+%doc %{_docdir}/kamailio/README.statistics
+%doc %{_docdir}/kamailio/README.textops
+%doc %{_docdir}/kamailio/README.tm
+%doc %{_docdir}/kamailio/README.uac
+%doc %{_docdir}/kamailio/README.uac_redirect
+%doc %{_docdir}/kamailio/README.uri
+%doc %{_docdir}/kamailio/README.uri_db
+%doc %{_docdir}/kamailio/README.usrloc
+%doc %{_docdir}/kamailio/README.xlog
+
+%dir %{_sysconfdir}/kamailio
+%config(noreplace) %{_sysconfdir}/kamailio/*
+%config %{_sysconfdir}/rc.d/init.d/*
+
+%dir %{_libdir}/kamailio
+%dir %{_libdir}/kamailio/modules
+%{_libdir}/kamailio/modules/acc.so
+%{_libdir}/kamailio/modules/alias_db.so
+%{_libdir}/kamailio/modules/auth.so
+%{_libdir}/kamailio/modules/auth_db.so
+%{_libdir}/kamailio/modules/auth_diameter.so
+%{_libdir}/kamailio/modules/avpops.so
+%{_libdir}/kamailio/modules/dbtext.so
+%{_libdir}/kamailio/modules/dispatcher.so
+%{_libdir}/kamailio/modules/diversion.so
+%{_libdir}/kamailio/modules/domain.so
+%{_libdir}/kamailio/modules/enum.so
+%{_libdir}/kamailio/modules/exec.so
+%{_libdir}/kamailio/modules/flatstore.so
+%{_libdir}/kamailio/modules/gflags.so
+%{_libdir}/kamailio/modules/group.so
+%{_libdir}/kamailio/modules/lcr.so
+%{_libdir}/kamailio/modules/mangler.so
+%{_libdir}/kamailio/modules/maxfwd.so
+%{_libdir}/kamailio/modules/mediaproxy.so
+%{_libdir}/kamailio/modules/msilo.so
+%{_libdir}/kamailio/modules/nathelper.so
+%{_libdir}/kamailio/modules/options.so
+%{_libdir}/kamailio/modules/path.so
+%{_libdir}/kamailio/modules/pdt.so
+%{_libdir}/kamailio/modules/permissions.so
+%{_libdir}/kamailio/modules/pike.so
+%{_libdir}/kamailio/modules/registrar.so
+%{_libdir}/kamailio/modules/rr.so
+%{_libdir}/kamailio/modules/siptrace.so
+%{_libdir}/kamailio/modules/sl.so
+%{_libdir}/kamailio/modules/sms.so
+%{_libdir}/kamailio/modules/speeddial.so
+%{_libdir}/kamailio/modules/statistics.so
+%{_libdir}/kamailio/modules/textops.so
+%{_libdir}/kamailio/modules/tm.so
+%{_libdir}/kamailio/modules/uac.so
+%{_libdir}/kamailio/modules/uac_redirect.so
+%{_libdir}/kamailio/modules/uri.so
+%{_libdir}/kamailio/modules/uri_db.so
+%{_libdir}/kamailio/modules/usrloc.so
+%{_libdir}/kamailio/modules/xlog.so
+
+%{_sbindir}/kamailio
+%{_sbindir}/kamctl
+%{_libdir}/kamctl/kamctl.base
+%{_libdir}/kamctl/kamctl.sqlbase
+%{_libdir}/kamctl/kamctl.ctlbase
+%{_libdir}/kamctl/kamctl.fifo
+%{_libdir}/kamctl/kamctl.unixsock
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+
+%files mysql
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.mysql
+
+%{_libdir}/kamailio/modules/mysql.so
+%{_sbindir}/kamailio_mysql.sh
+%{_libdir}/kamctl/kamctl.mysql
+
+%files postgres
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.postgres
+
+%{_libdir}/kamailio/modules/postgres.so
+%{_sbindir}/kamailio_postgres.sh
+%{_libdir}/kamctl/kamctl.pgsql
+
+%files unixodbc
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.unixodbc
+
+%{_libdir}/kamailio/modules/unixodbc.so
+
+%files jabber
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.jabber
+
+%{_libdir}/kamailio/modules/jabber.so
+
+%files cpl
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.cpl-c
+
+%{_libdir}/kamailio/modules/cpl-c.so
+
+%files pa
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.pa
+
+%{_libdir}/kamailio/modules/pa.so
+
+%files radius
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.avp_radius
+%doc %{_docdir}/kamailio/README.auth_radius
+%doc %{_docdir}/kamailio/README.group_radius
+%doc %{_docdir}/kamailio/README.uri_radius
+
+%{_libdir}/kamailio/modules/avp_radius.so
+%{_libdir}/kamailio/modules/auth_radius.so
+%{_libdir}/kamailio/modules/group_radius.so
+%{_libdir}/kamailio/modules/uri_radius.so
+
+
+%changelog
+
+* Fri Jun 30 2006 Bogdan-Andrei Iancu <bogdan at voice-system.ro>
+- version set to 1.1.0
+- added packages for pa, postgres and unixodbc
+- added dialog, lcr, options, path, siptrace, statistics modules
+
+* Thu Oct 27 2005 Daniel-Constantin Mierla <miconda at gmail.com>
+- version set to 1.0.0
+- added readme for flatstore
+- added uac and uac_redirect modules
+
+* Wed Jun 08 2005 Daniel-Constantin Mierla <miconda at gmail.com>
+- First version of the spec file.
diff --git a/pkg/kamailio/rpm/kamailio.spec.CenOS b/pkg/kamailio/rpm/kamailio.spec.CenOS
new file mode 100644
index 0000000..01661f8
--- /dev/null
+++ b/pkg/kamailio/rpm/kamailio.spec.CenOS
@@ -0,0 +1,742 @@
+%define name    kamailio
+%define ver     4.1.4
+%define rel     0
+%define _sharedir %{_prefix}/share
+
+%define MYSQL_MODULES           mysql
+%define POSTGRES_MODULES        postgres
+%define UNIXODBC_MODULES        unixodbc
+%define LDAP_MODULES            ldap
+%define XMLRPC_MODULES          xml
+%define PERL_MODULES            perl
+%define PYTHON_MODULES          python
+%define LUA_MODULES             lua
+%define UTILS_MODULES           utils
+%define PURPLE_MODULES          purple
+%define MEMCACHED_MODULES       memcached
+%define TLS_MODULES             tls
+%define XMPP_MODULES            xmpp
+%define CPL_MODULES             cpl
+%define SNMPSTATS_MODULES       snmpstats
+%define CARRIERROUTE_MODULES    carrierroute
+%define PRESENCE_MODULES        presence
+%define RADIUS_MODULES          radius
+%define GEOIP_MODULES           geoip
+
+Summary:      Kamailio, very fast and flexible SIP Server
+Name:         %name
+Version:      %ver
+Release:      %rel
+Packager:     Ovidiu Sas <osas at voipembedded.com>
+License:      GPL
+Group:        System Environment/Daemons
+Source0:      http://kamailio.org/pub/kamailio/%{ver}/%{name}-%{ver}_src.tar.gz
+Source1:      kamailio.init
+Source2:      kamailio.default
+URL:          http://kamailio.org/
+Vendor:       kamailio.org
+BuildRoot:    %{_tmppath}/%{name}-%{ver}-buildroot
+Conflicts:    kamailio-mysql < %ver, kamailio-postgres < %ver, kamailio-unixodbc < %ver, kamailio-ldap < %ver, kamailio-xmlrpc < %ver, kamailio-perl < %ver, kamailio-python < %ver, kamailio-lua < %ver, kamailio-utils < %ver, kamailio-purple < %ver, kamailio-memcached  < %ver, kamailio-tls  < %ver, kamailio-xmpp  < %ver, kamailio-cpl  < %ver, kamailio-snmpstats  < %ver, kamailio-carrierroute  < %ver, kamailio-presence  < %ver, kamailio-radius  < %ver, kamailio-geoip  < %ver
+BuildPrereq:  make flex bison pcre-devel
+
+%description
+Kamailio is a very fast and flexible SIP (RFC3261)
+proxy server. Written entirely in C, kamailio can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL and UNIXODBC support, a presence agent,
+radius authentication, record routing, an SMS gateway, a
+transaction and dialog module, OSP module, statistics support,
+registrar and user location, SNMP, SIMPLE Presence and Perl programming
+interface.
+
+%package  mysql
+Summary:  MySQL connectivity for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  mysql-devel zlib-devel
+
+%description mysql
+The kamailio-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+
+%package  postgres
+Summary:  MPOSTGRES connectivity for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  postgresql-devel
+
+%description postgres
+The kamailio-postgres package contains Postgres database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+
+%package  unixodbc
+Summary:  UNIXODBC connectivity for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  unixODBC-devel
+
+%description unixodbc
+The kamailio-unixodbc package contains UNIXODBC database connectivity support
+that is required by other modules with database dependencies.
+
+
+%package  utils
+Summary:  Utils for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+
+%description utils
+The kamailio-utils package provides a set utility functions for Kamailio
+
+
+%package  cpl
+Summary:  CPL module (CPL interpreter engine) for Kamailio
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  libxml2-devel
+
+%description cpl
+The kamailio-cpl package provides a CPL interpreter engine for Kamailio
+
+
+%package  radius
+Summary:  Kamailio radius support for AAA API.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  radiusclient-ng-devel
+
+%description radius
+The kamailio-radius package contains modules for radius authentication, group
+membership and uri checking.
+
+
+%package  snmpstats
+Summary:  SNMP AgentX subagent module for Kamailio
+Group:    System Environment/Daemons
+Requires: kamailio = %ver, net-snmp-utils
+BuildPrereq:  lm_sensors-devel net-snmp-devel
+
+%description snmpstats
+The kamailio-snmpstats package snmpstats module for Kamailio.  This module acts
+as an AgentX subagent which connects to a master agent.
+
+
+%package  presence
+Summary:  sip presence user agent support for Kamailio
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  libxml2-devel, curl-devel
+
+%description presence
+The kamailio-presence package contains a sip Presence Agent.
+
+
+%package  xmpp
+Summary:  SIP2XMPP message translation support for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  expat-devel
+
+%description xmpp
+The kamailio-xmpp package contains a SIP to XMPP message translator.
+
+
+%package  tls
+Summary:  TLS transport protocol for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  openssl-devel
+
+%description tls
+The kamailio-tls package contains the SIP TLSt transport mechanism for Kamailio.
+
+
+%package  carrierroute
+Summary:  Routing module for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  libconfuse-devel
+
+%description carrierroute
+The kamailio-carrierroute package contains a fast routing engine.
+
+
+%package  purple
+Summary:  Provides the purple module, a multi-protocol IM gateway.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: libpurple-devel
+
+%description purple
+The kamailio-purple package provides the purple module, a multi-protocol instant
+messaging gateway module.
+
+
+%package  ldap
+Summary:  LDAP modules for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: openldap-devel
+
+%description ldap
+The kamailio-ldap package provides the ldap and h350 modules for Kamailio,
+enabling LDAP queries from the Kamailio config and storage of SIP account
+data in an LDAP directory.
+
+
+#%package  memcached
+#Summary:  Distributed hash table for Kamailio.
+#Group:    System Environment/Daemons
+#Requires: kamailio = %ver
+#BuildPrereq:  libmemcached-devel
+#
+#%description memcached
+#The kamailio-memcached package provides access to a distributed hash table memcached.
+
+
+#%package  xmlrpc
+#Summary:  XMLRPC support for Kamailio's Management Interface.
+#Group:    System Environment/Daemons
+#Requires: kamailio = %ver
+#BuildPrereq:  libxml2-devel xmlrpc-c-devel
+#
+#%description xmlrpc
+#The kamailio-xmlrpc package provides the XMLRPC transport implementations for Kamailio's
+#Management and Control Interface.
+
+
+%package  perl
+Summary:  Perl extensions and database driver for Kamailio.
+Group:    System Environment/Daemons 
+Requires: kamailio = %ver
+BuildPrereq: mod_perl-devel
+
+%description perl
+The kamailio-perl package provides an interface for Kamailio to write Perl extensions and
+the perlvdb database driver for Kamailio.
+
+
+%package  lua
+Summary:  Lua extensions for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: lua-devel
+
+%description lua
+The kamailio-lua package provides an interface for Kamailio to write Python extensions
+
+
+%package  python
+Summary:  Python extensions for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: python-devel
+
+%description python
+The kamailio-python package provides an interface for Kamailio to write Python extensions
+
+
+%package  geoip
+Summary:  GeoIP extensions for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: geoip-devel
+
+%description geoip
+The kamailio-geoip package provides a GeoIP interface for Kamailio
+
+
+
+
+%prep
+%setup -n %{name}-%{ver}
+
+%build
+make FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$RPM_BUILD_ROOT basedir=$RPM_BUILD_ROOT cfg_target=/%{_sysconfdir}/kamailio/ modules_dirs="modules modules_k"
+make
+make every-module skip_modules="iptrtpproxy" group_include="kstandard"
+make every-module group_include="k%MYSQL_MODULES"
+make every-module group_include="k%POSTGRES_MODULES"
+make every-module group_include="k%UNIXODBC_MODULES"
+make every-module group_include="k%UTILS_MODULES"
+make every-module group_include="k%CPL_MODULES"
+make every-module group_include="k%RADIUS_MODULES"
+make every-module group_include="k%SNMPSTATS_MODULES"
+make every-module group_include="k%PRESENCE_MODULES"
+make every-module group_include="k%XMPP_MODULES"
+make every-module group_include="k%TLS_MODULES"
+make every-module group_include="k%CARRIERROUTE_MODULES"
+make every-module group_include="k%PURPLE_MODULES"
+make every-module group_include="k%LDAP_MODULES"
+#make every-module group_include="k%MEMCACHED_MODULES"
+#make every-module group_include="k%XMLRPC_MODULES"
+make every-module group_include="k%PERL_MODULES"
+make every-module group_include="k%LUA_MODULES"
+make every-module group_include="k%PYTHON_MODULES"
+make every-module group_include="k%GEOIP_MODULES"
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install
+make install-modules-all skip_modules="iptrtpproxy" group_include="kstandard"
+make install-modules-all group_include="k%MYSQL_MODULES"
+make install-modules-all group_include="k%POSTGRES_MODULES"
+make install-modules-all group_include="k%UNIXODBC_MODULES"
+make install-modules-all group_include="k%UTILS_MODULES"
+make install-modules-all group_include="k%CPL_MODULES"
+make install-modules-all group_include="k%SNMPSTATS_MODULES"
+make install-modules-all group_include="k%RADIUS_MODULES"
+make install-modules-all group_include="k%PRESENCE_MODULES"
+make install-modules-all group_include="k%XMPP_MODULES"
+make install-modules-all group_include="k%TLS_MODULES"
+make install-modules-all group_include="k%CARRIERROUTE_MODULES"
+make install-modules-all group_include="k%PURPLE_MODULES"
+make install-modules-all group_include="k%LDAP_MODULES"
+#make install-modules-all group_include="k%MEMCACHED_MODULES"
+#make install-modules-all group_include="k%XMLRPC_MODULES"
+make install-modules-all group_include="k%PERL_MODULES"
+make install-modules-all group_include="k%LUA_MODULES"
+make install-modules-all group_include="k%PYTHON_MODULES"
+make install-modules-all group_include="k%GEOIP_MODULES"
+
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+install -m755 $RPM_SOURCE_DIR/kamailio.init \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/kamailio
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/default
+install -m755 $RPM_SOURCE_DIR/kamailio.default \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/default/kamailio
+
+
+%pre
+/usr/sbin/groupadd -r kamailio 2> /dev/null || :
+/usr/sbin/useradd -r -g kamailio -s /bin/false -c "Kamailio daemon" -d \
+                  %{_libdir}/kamailio kamailio 2> /dev/null || :
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+                
+%post           
+/sbin/chkconfig --add kamailio
+
+%preun          
+if [ $1 = 0 ]; then
+    /sbin/service kamailio stop > /dev/null 2>&1
+    /sbin/chkconfig --del kamailio
+fi
+                
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/kamailio
+%doc %{_docdir}/kamailio/AUTHORS
+%doc %{_docdir}/kamailio/NEWS
+%doc %{_docdir}/kamailio/INSTALL
+%doc %{_docdir}/kamailio/README
+%doc %{_docdir}/kamailio/README-MODULES
+%doc %{_docdir}/kamailio/modules/README.auth
+%doc %{_docdir}/kamailio/modules/README.avpops
+%doc %{_docdir}/kamailio/modules/README.blst
+%doc %{_docdir}/kamailio/modules/README.cfg_db
+%doc %{_docdir}/kamailio/modules/README.cfg_rpc
+%doc %{_docdir}/kamailio/modules/README.counters
+%doc %{_docdir}/kamailio/modules/README.ctl
+%doc %{_docdir}/kamailio/modules/README.db_flatstore
+%doc %{_docdir}/kamailio/modules/README.debugger
+%doc %{_docdir}/kamailio/modules/README.dialplan
+%doc %{_docdir}/kamailio/modules/README.enum
+%doc %{_docdir}/kamailio/modules/README.lcr
+%doc %{_docdir}/kamailio/modules/README.malloc_test
+%doc %{_docdir}/kamailio/modules/README.matrix
+%doc %{_docdir}/kamailio/modules/README.mediaproxy
+%doc %{_docdir}/kamailio/modules/README.mi_rpc
+%doc %{_docdir}/kamailio/modules/README.mqueue
+%doc %{_docdir}/kamailio/modules/README.mtree
+%doc %{_docdir}/kamailio/modules/README.pdb
+%doc %{_docdir}/kamailio/modules/README.pipelimit
+%doc %{_docdir}/kamailio/modules/README.prefix_route
+#%doc %{_docdir}/kamailio/modules/README.privacy
+%doc %{_docdir}/kamailio/modules/README.ratelimit
+%doc %{_docdir}/kamailio/modules/README.sanity
+%doc %{_docdir}/kamailio/modules/README.sl
+%doc %{_docdir}/kamailio/modules/README.sms
+%doc %{_docdir}/kamailio/modules/README.textopsx
+%doc %{_docdir}/kamailio/modules/README.tm
+%doc %{_docdir}/kamailio/modules/README.topoh
+%doc %{_docdir}/kamailio/modules/README.xhttp
+%doc %{_docdir}/kamailio/modules_k/README.acc
+%doc %{_docdir}/kamailio/modules_k/README.alias_db
+%doc %{_docdir}/kamailio/modules_k/README.auth_db
+%doc %{_docdir}/kamailio/modules_k/README.auth_diameter
+%doc %{_docdir}/kamailio/modules_k/README.benchmark
+%doc %{_docdir}/kamailio/modules_k/README.call_control
+%doc %{_docdir}/kamailio/modules_k/README.cfgutils
+%doc %{_docdir}/kamailio/modules_k/README.db_text
+%doc %{_docdir}/kamailio/modules_k/README.dialog
+%doc %{_docdir}/kamailio/modules_k/README.dispatcher
+%doc %{_docdir}/kamailio/modules_k/README.diversion
+%doc %{_docdir}/kamailio/modules_k/README.domain
+%doc %{_docdir}/kamailio/modules_k/README.domainpolicy
+%doc %{_docdir}/kamailio/modules_k/README.drouting
+%doc %{_docdir}/kamailio/modules_k/README.exec
+%doc %{_docdir}/kamailio/modules_k/README.group
+%doc %{_docdir}/kamailio/modules_k/README.htable
+%doc %{_docdir}/kamailio/modules_k/README.imc
+%doc %{_docdir}/kamailio/modules_k/README.kex
+%doc %{_docdir}/kamailio/modules_k/README.maxfwd
+%doc %{_docdir}/kamailio/modules_k/README.mi_datagram
+%doc %{_docdir}/kamailio/modules_k/README.mi_fifo
+%doc %{_docdir}/kamailio/modules_k/README.msilo
+%doc %{_docdir}/kamailio/modules_k/README.nat_traversal
+%doc %{_docdir}/kamailio/modules_k/README.nathelper
+%doc %{_docdir}/kamailio/modules_k/README.path
+%doc %{_docdir}/kamailio/modules_k/README.pdt
+%doc %{_docdir}/kamailio/modules_k/README.permissions
+%doc %{_docdir}/kamailio/modules_k/README.pike
+%doc %{_docdir}/kamailio/modules_k/README.pua_mi
+%doc %{_docdir}/kamailio/modules_k/README.pv
+%doc %{_docdir}/kamailio/modules_k/README.qos
+%doc %{_docdir}/kamailio/modules_k/README.regex
+%doc %{_docdir}/kamailio/modules_k/README.registrar
+%doc %{_docdir}/kamailio/modules_k/README.rr
+%doc %{_docdir}/kamailio/modules_k/README.rtimer
+%doc %{_docdir}/kamailio/modules_k/README.rtpproxy
+%doc %{_docdir}/kamailio/modules_k/README.seas
+%doc %{_docdir}/kamailio/modules_k/README.siptrace
+%doc %{_docdir}/kamailio/modules_k/README.siputils
+%doc %{_docdir}/kamailio/modules_k/README.speeddial
+%doc %{_docdir}/kamailio/modules_k/README.sqlops
+%doc %{_docdir}/kamailio/modules_k/README.sst
+%doc %{_docdir}/kamailio/modules_k/README.statistics
+%doc %{_docdir}/kamailio/modules_k/README.textops
+%doc %{_docdir}/kamailio/modules_k/README.tmx
+%doc %{_docdir}/kamailio/modules_k/README.uac
+%doc %{_docdir}/kamailio/modules_k/README.uac_redirect
+%doc %{_docdir}/kamailio/modules_k/README.uri_db
+%doc %{_docdir}/kamailio/modules_k/README.userblacklist
+%doc %{_docdir}/kamailio/modules_k/README.usrloc
+%doc %{_docdir}/kamailio/modules_k/README.xlog
+
+
+%dir %{_sysconfdir}/kamailio
+%config(noreplace) %{_sysconfdir}/kamailio/*
+%config %{_sysconfdir}/rc.d/init.d/*
+%config %{_sysconfdir}/default/*
+
+%dir %{_libdir}/kamailio
+%{_libdir}/kamailio/libkcore.so
+%{_libdir}/kamailio/libkcore.so.1
+%{_libdir}/kamailio/libkcore.so.1.0
+%{_libdir}/kamailio/libkmi.so
+%{_libdir}/kamailio/libkmi.so.1
+%{_libdir}/kamailio/libkmi.so.1.0
+%{_libdir}/kamailio/libsrdb1.so
+%{_libdir}/kamailio/libsrdb1.so.1
+%{_libdir}/kamailio/libsrdb1.so.1.0
+%{_libdir}/kamailio/libsrdb2.so
+%{_libdir}/kamailio/libsrdb2.so.1
+%{_libdir}/kamailio/libsrdb2.so.1.0
+%{_libdir}/kamailio/libtrie.so
+%{_libdir}/kamailio/libtrie.so.1
+%{_libdir}/kamailio/libtrie.so.1.0
+%dir %{_libdir}/kamailio/modules
+%{_libdir}/kamailio/modules/auth.so
+%{_libdir}/kamailio/modules/avpops.so
+%{_libdir}/kamailio/modules/blst.so
+%{_libdir}/kamailio/modules/cfg_db.so
+%{_libdir}/kamailio/modules/cfg_rpc.so
+%{_libdir}/kamailio/modules/counters.so
+%{_libdir}/kamailio/modules/ctl.so
+%{_libdir}/kamailio/modules/db_flatstore.so
+%{_libdir}/kamailio/modules/debugger.so
+%{_libdir}/kamailio/modules/dialplan.so
+%{_libdir}/kamailio/modules/enum.so
+%{_libdir}/kamailio/modules/lcr.so
+%{_libdir}/kamailio/modules/malloc_test.so
+%{_libdir}/kamailio/modules/matrix.so
+%{_libdir}/kamailio/modules/mediaproxy.so
+%{_libdir}/kamailio/modules/mi_rpc.so
+%{_libdir}/kamailio/modules/mqueue.so
+%{_libdir}/kamailio/modules/mtree.so
+%{_libdir}/kamailio/modules/pdb.so
+%{_libdir}/kamailio/modules/pipelimit.so
+%{_libdir}/kamailio/modules/prefix_route.so
+%{_libdir}/kamailio/modules/privacy.so
+%{_libdir}/kamailio/modules/ratelimit.so
+%{_libdir}/kamailio/modules/sanity.so
+%{_libdir}/kamailio/modules/sl.so
+%{_libdir}/kamailio/modules/sms.so
+%{_libdir}/kamailio/modules/tm.so
+%{_libdir}/kamailio/modules/textopsx.so
+%{_libdir}/kamailio/modules/topoh.so
+%{_libdir}/kamailio/modules/xhttp.so
+%dir %{_libdir}/kamailio/modules_k
+%{_libdir}/kamailio/modules_k/acc.so
+%{_libdir}/kamailio/modules_k/alias_db.so
+%{_libdir}/kamailio/modules_k/auth_db.so
+%{_libdir}/kamailio/modules_k/auth_diameter.so
+%{_libdir}/kamailio/modules_k/benchmark.so
+%{_libdir}/kamailio/modules_k/call_control.so
+%{_libdir}/kamailio/modules_k/cfgutils.so
+%{_libdir}/kamailio/modules_k/db_text.so
+%{_libdir}/kamailio/modules_k/dialog.so
+%{_libdir}/kamailio/modules_k/dispatcher.so
+%{_libdir}/kamailio/modules_k/diversion.so
+%{_libdir}/kamailio/modules_k/domain.so
+%{_libdir}/kamailio/modules_k/domainpolicy.so
+%{_libdir}/kamailio/modules_k/drouting.so
+%{_libdir}/kamailio/modules_k/exec.so
+%{_libdir}/kamailio/modules_k/group.so
+%{_libdir}/kamailio/modules_k/htable.so
+%{_libdir}/kamailio/modules_k/imc.so
+%{_libdir}/kamailio/modules_k/kex.so
+%{_libdir}/kamailio/modules_k/maxfwd.so
+%{_libdir}/kamailio/modules_k/mi_datagram.so
+%{_libdir}/kamailio/modules_k/mi_fifo.so
+%{_libdir}/kamailio/modules_k/msilo.so
+%{_libdir}/kamailio/modules_k/nat_traversal.so
+%{_libdir}/kamailio/modules_k/nathelper.so
+%{_libdir}/kamailio/modules_k/path.so
+%{_libdir}/kamailio/modules_k/pdt.so
+%{_libdir}/kamailio/modules_k/permissions.so
+%{_libdir}/kamailio/modules_k/pike.so
+%{_libdir}/kamailio/modules_k/pua_mi.so
+%{_libdir}/kamailio/modules_k/pv.so
+%{_libdir}/kamailio/modules_k/qos.so
+%{_libdir}/kamailio/modules_k/regex.so
+%{_libdir}/kamailio/modules_k/registrar.so
+%{_libdir}/kamailio/modules_k/rr.so
+%{_libdir}/kamailio/modules_k/rtimer.so
+%{_libdir}/kamailio/modules_k/rtpproxy.so
+%{_libdir}/kamailio/modules_k/seas.so
+%{_libdir}/kamailio/modules_k/siptrace.so
+%{_libdir}/kamailio/modules_k/siputils.so
+%{_libdir}/kamailio/modules_k/speeddial.so
+%{_libdir}/kamailio/modules_k/sqlops.so
+%{_libdir}/kamailio/modules_k/sst.so
+%{_libdir}/kamailio/modules_k/statistics.so
+%{_libdir}/kamailio/modules_k/textops.so
+%{_libdir}/kamailio/modules_k/tmx.so
+%{_libdir}/kamailio/modules_k/uac.so
+%{_libdir}/kamailio/modules_k/uac_redirect.so
+%{_libdir}/kamailio/modules_k/uri_db.so
+%{_libdir}/kamailio/modules_k/userblacklist.so
+%{_libdir}/kamailio/modules_k/usrloc.so
+%{_libdir}/kamailio/modules_k/xlog.so
+
+
+%{_sbindir}/kamailio
+%{_sbindir}/kamctl
+%{_sbindir}/kamdbctl
+%{_sbindir}/kamcmd
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.py
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyc
+%{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyo
+%{_libdir}/kamailio/kamctl/kamctl.base
+%{_libdir}/kamailio/kamctl/kamctl.ctlbase
+%{_libdir}/kamailio/kamctl/kamctl.dbtext
+%{_libdir}/kamailio/kamctl/kamctl.fifo
+%{_libdir}/kamailio/kamctl/kamctl.ser
+%{_libdir}/kamailio/kamctl/kamctl.ser_mi
+%{_libdir}/kamailio/kamctl/kamctl.sqlbase
+%{_libdir}/kamailio/kamctl/kamctl.unixsock
+%{_libdir}/kamailio/kamctl/kamdbctl.base
+%{_libdir}/kamailio/kamctl/kamdbctl.dbtext
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+%{_sharedir}/kamailio/dbtext/kamailio/*
+
+
+%files mysql
+%defattr(-,root,root)
+%{_libdir}/kamailio/modules/db_mysql.so
+%{_libdir}/kamailio/kamctl/kamctl.mysql
+%{_libdir}/kamailio/kamctl/kamdbctl.mysql
+%{_sharedir}/kamailio/mysql/*
+
+
+%files postgres
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.db_postgres
+%{_libdir}/kamailio/modules/db_postgres.so
+%{_libdir}/kamailio/kamctl/kamctl.pgsql
+%{_libdir}/kamailio/kamctl/kamdbctl.pgsql
+%{_sharedir}/kamailio/postgres/*
+
+
+%files unixodbc
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules_k/README.db_unixodbc
+%{_libdir}/kamailio/modules_k/db_unixodbc.so
+
+
+%files utils
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules/README.utils
+%{_libdir}/kamailio/modules/utils.so
+
+
+%files cpl
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules_k/README.cpl-c
+%{_libdir}/kamailio/modules_k/cpl-c.so
+
+
+%files radius
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules_k/README.acc_radius
+%{_docdir}/kamailio/modules_k/README.auth_radius
+%{_docdir}/kamailio/modules_k/README.misc_radius
+%{_docdir}/kamailio/modules/README.peering
+%{_libdir}/kamailio/modules_k/acc_radius.so
+%{_libdir}/kamailio/modules_k/auth_radius.so
+%{_libdir}/kamailio/modules_k/misc_radius.so
+%{_libdir}/kamailio/modules/peering.so
+
+
+%files snmpstats
+%defattr(-,root,root)
+%{_docdir}/kamailio/modules_k/README.snmpstats
+%{_libdir}/kamailio/modules_k/snmpstats.so
+
+
+%files presence
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules_k/README.presence
+%doc %{_docdir}/kamailio/modules_k/README.presence_conference
+%doc %{_docdir}/kamailio/modules_k/README.presence_dialoginfo
+%doc %{_docdir}/kamailio/modules_k/README.presence_mwi
+%doc %{_docdir}/kamailio/modules_k/README.presence_xml
+%doc %{_docdir}/kamailio/modules_k/README.pua
+%doc %{_docdir}/kamailio/modules_k/README.pua_bla
+%doc %{_docdir}/kamailio/modules_k/README.pua_dialoginfo
+%doc %{_docdir}/kamailio/modules_k/README.pua_mi
+%doc %{_docdir}/kamailio/modules_k/README.pua_usrloc
+%doc %{_docdir}/kamailio/modules_k/README.pua_xmpp
+%doc %{_docdir}/kamailio/modules_k/README.rls
+%doc %{_docdir}/kamailio/modules_k/README.xcap_client
+%doc %{_docdir}/kamailio/modules_k/README.xcap_server
+%{_libdir}/kamailio/modules_k/presence.so
+%{_libdir}/kamailio/modules_k/presence_conference.so
+%{_libdir}/kamailio/modules_k/presence_dialoginfo.so
+%{_libdir}/kamailio/modules_k/presence_mwi.so
+%{_libdir}/kamailio/modules_k/presence_xml.so
+%{_libdir}/kamailio/modules_k/pua.so
+%{_libdir}/kamailio/modules_k/pua_bla.so
+%{_libdir}/kamailio/modules_k/pua_dialoginfo.so
+%{_libdir}/kamailio/modules_k/pua_mi.so
+%{_libdir}/kamailio/modules_k/pua_usrloc.so
+%{_libdir}/kamailio/modules_k/pua_xmpp.so
+%{_libdir}/kamailio/modules_k/rls.so
+%{_libdir}/kamailio/modules_k/xcap_client.so
+%{_libdir}/kamailio/modules_k/xcap_server.so
+
+
+%files xmpp
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules_k/README.xmpp
+%{_libdir}/kamailio/modules_k/xmpp.so
+
+
+%files tls
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.tls
+%{_libdir}/kamailio/modules/tls.so
+
+
+%files carrierroute
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.carrierroute
+%{_libdir}/kamailio/modules/carrierroute.so
+
+
+%files purple
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules_k/README.purple
+%{_libdir}/kamailio/modules_k/purple.so
+
+
+%files ldap
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules_k/README.h350
+%doc %{_docdir}/kamailio/modules_k/README.ldap
+%{_libdir}/kamailio/modules_k/h350.so
+%{_libdir}/kamailio/modules_k/ldap.so
+
+
+#%files memcached
+#%defattr(-,root,root)
+#%doc %{_docdir}/kamailio/modules_k/README.memcached
+#%{_libdir}/kamailio/modules_k/memcached.so
+
+
+#%files xmlrpc
+#%defattr(-,root,root)
+#%doc %{_docdir}/kamailio/modules_k/README.memcached
+#%{_libdir}/kamailio/modules_k/memcached.so
+
+
+%files perl
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules_k/README.perl
+%doc %{_docdir}/kamailio/modules_k/README.perlvdb
+%{_libdir}/kamailio/modules_k/perl.so
+%{_libdir}/kamailio/modules_k/perlvdb.so
+%{_libdir}/kamailio/perl/OpenSER.pm
+%{_libdir}/kamailio/perl/OpenSER/Constants.pm
+%{_libdir}/kamailio/perl/OpenSER/LDAPUtils/LDAPConf.pm
+%{_libdir}/kamailio/perl/OpenSER/LDAPUtils/LDAPConnection.pm
+%{_libdir}/kamailio/perl/OpenSER/Message.pm
+%{_libdir}/kamailio/perl/OpenSER/Utils/Debug.pm
+%{_libdir}/kamailio/perl/OpenSER/Utils/PhoneNumbers.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/AccountingSIPtrace.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Alias.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Auth.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Describe.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/Speeddial.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Adapter/TableVersions.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Column.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Pair.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/ReqCond.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Result.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/VTab.pm
+%{_libdir}/kamailio/perl/OpenSER/VDB/Value.pm
+
+%files lua
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_lua
+%{_libdir}/kamailio/modules/app_lua.so
+
+
+%files python
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.app_python
+%{_libdir}/kamailio/modules/app_python.so
+
+
+%files geoip
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.geoip
+%{_libdir}/kamailio/modules/geoip.so
+
+
+
+%changelog
+* Mon Oct 4 2010 Ovidiu Sas <osas at voipembedded.com>
+ - Update for kamailio 3.1
+
+* Tue Mar 23 2010 Ovidiu Sas <osas at voipembedded.com>
+ - First version of the spec file for kamailio 3.0
diff --git a/pkg/kamailio/rpm/kamailio.spec.SuSE b/pkg/kamailio/rpm/kamailio.spec.SuSE
new file mode 100644
index 0000000..9b2aa98
--- /dev/null
+++ b/pkg/kamailio/rpm/kamailio.spec.SuSE
@@ -0,0 +1,383 @@
+%define name    kamailio
+%define ver     4.1.4
+%define rel     0
+
+%define EXCLUDED_MODULES	mysql jabber cpl-c auth_radius misc_radius peering postgress pa unixodbc osp tlsops
+%define MYSQL_MODULES		mysql
+%define POSTGRES_MODULES	postgres
+%define UNIXODBC_MODULES	unixodbc
+%define JABBER_MODULES		jabber
+%define CPL_MODULES			cpl-c
+%define PA_MODULES			pa
+%define RADIUS_MODULES		auth_radius misc_radius peering
+%define RADIUS_MOD_PATH		modules/auth_radius modules/misc_radius modules/peering
+
+Summary:      Kamailio, very fast and flexible SIP Proxy
+Name:         %name
+Version:      %ver
+Release:      %rel
+
+Packager:     Daniel-Constantin Mierla <miconda at gmail.com>
+Copyright:    GPL
+Group:        Networking/Daemons
+Source:       http://kamailio.org/pub/kamailio/stable/%{name}-%{ver}_src.tar.gz
+Source2:      kamailio.init.SuSE
+URL:          http://www.kamailio.org/
+Vendor:       kamailio.org
+BuildRoot:    /var/tmp/%{name}-%{ver}-root
+Conflicts:    kamailio < %ver, kamailio-mysql < %ver, kamailio-jabber < %ver, kamailio-radius < %ver, kamailio-postgres < %ver, kamailio-unixodbc < %ver, kamailio-pa < %ver
+BuildPrereq:  make flex bison 
+
+
+%description
+Kamailio is a very fast and flexible SIP (RFC3261)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL and UNIXODBC support, a presence agent,
+radius authentication, record routing, an SMS gateway, a jabber gateway, a 
+transaction and dialog module, OSP module, statistics support, 
+registrar and user location.
+
+%package  mysql
+Summary:  MySQL connectivity for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: mysql-devel zlib-devel
+
+%description mysql
+The kamailio-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  postgres
+Summary:  MPOSTGRES connectivity for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  postgresql-devel
+
+%description postgres
+The kamailio-postgres package contains Postgres database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  unixodbc
+Summary:  UNIXODBC connectivity for Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  unixodbc-dev
+
+%description unixodbc
+The kamailio-unixodbc package contains UNIXODBC database connectivity support
+that is required by other modules with database dependencies.
+
+
+%package  jabber
+Summary:  sip jabber message translation support for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: expat
+
+%description jabber
+The kamailio-jabber package contains a sip to jabber message translator.
+
+%package  cpl
+Summary:  CPL interpreter engine for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq: libxml2-dev
+
+%description cpl
+The kamailio-cpl package contains a CPL interpreter engine.
+
+%package  pa
+Summary:  sip presence agent support for the Kamailio.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  libxml2-dev
+
+%description pa
+The kamailio-pa package contains a sip Presence Agent.
+
+%package  radius
+Summary:  kamailio radius authentication, group and uri check modules.
+Group:    System Environment/Daemons
+Requires: kamailio = %ver
+BuildPrereq:  radiusclient
+
+%description radius
+The kamailio-radius package contains modules for radius authentication, group
+ membership and uri checking.
+
+%prep
+%setup
+
+%build
+make all skip_modules="%EXCLUDED_MODULES"         cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%MYSQL_MODULES"     cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%POSTGRES_MODULES"  cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%UNIXODBC_MODULES"  cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%JABBER_MODULES"    cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%CPL_MODULES"       cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="modules/%PA_MODULES"        cfg-target=/%{_sysconfdir}/kamailio/
+make modules modules="%RADIUS_MOD_PATH"           cfg-target=/%{_sysconfdir}/kamailio/
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install skip_modules="%EXCLUDED_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="modules/%POSTGRES_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="modules/%UNIXODBC_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="modules/%CPL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="modules/%PA_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-modules modules="%RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/kamailio/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+make install-doc modules="modules/%JABBER_MODULES %RADIUS_MOD_PATH %MYSQL_MODULES %POSTGRES_MODULES %UNIXODBC_MODULES %CPL_MODULES %PA_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/kamailio/
+
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
+install -m755 $RPM_SOURCE_DIR/kamailio.init.SuSE \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/kamailio
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%post
+sbin/insserv etc/init.d/kamailio
+
+%preun
+if [ $1 = 0 ]; then
+    etc/init.d/kamailio stop > /dev/null 2>&1
+fi
+
+%postun
+sbin/insserv etc/init.d/
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/kamailio
+%doc %{_docdir}/kamailio/AUTHORS
+%doc %{_docdir}/kamailio/NEWS
+%doc %{_docdir}/kamailio/INSTALL
+%doc %{_docdir}/kamailio/README
+%doc %{_docdir}/kamailio/README-MODULES
+%doc %{_docdir}/kamailio/README.acc
+%doc %{_docdir}/kamailio/README.alias_db
+%doc %{_docdir}/kamailio/README.auth
+%doc %{_docdir}/kamailio/README.auth_db
+%doc %{_docdir}/kamailio/README.auth_diameter
+%doc %{_docdir}/kamailio/README.avpops
+%doc %{_docdir}/kamailio/README.dbtext
+%doc %{_docdir}/kamailio/README.dialog
+%doc %{_docdir}/kamailio/README.dispatcher
+%doc %{_docdir}/kamailio/README.diversion
+%doc %{_docdir}/kamailio/README.domain
+%doc %{_docdir}/kamailio/README.enum
+%doc %{_docdir}/kamailio/README.exec
+%doc %{_docdir}/kamailio/README.flatstore
+%doc %{_docdir}/kamailio/README.gflags
+%doc %{_docdir}/kamailio/README.group
+%doc %{_docdir}/kamailio/README.lcr
+%doc %{_docdir}/kamailio/README.mangler
+%doc %{_docdir}/kamailio/README.maxfwd
+%doc %{_docdir}/kamailio/README.mediaproxy
+%doc %{_docdir}/kamailio/README.msilo
+%doc %{_docdir}/kamailio/README.nathelper
+%doc %{_docdir}/kamailio/README.options
+%doc %{_docdir}/kamailio/README.path
+%doc %{_docdir}/kamailio/README.pdt
+%doc %{_docdir}/kamailio/README.permissions
+%doc %{_docdir}/kamailio/README.pike
+%doc %{_docdir}/kamailio/README.registrar
+%doc %{_docdir}/kamailio/README.rr
+%doc %{_docdir}/kamailio/README.siptrace
+%doc %{_docdir}/kamailio/README.sl
+%doc %{_docdir}/kamailio/README.sms
+%doc %{_docdir}/kamailio/README.speeddial
+%doc %{_docdir}/kamailio/README.statistics
+%doc %{_docdir}/kamailio/README.textops
+%doc %{_docdir}/kamailio/README.tm
+%doc %{_docdir}/kamailio/README.uac
+%doc %{_docdir}/kamailio/README.uac_redirect
+%doc %{_docdir}/kamailio/README.uri
+%doc %{_docdir}/kamailio/README.uri_db
+%doc %{_docdir}/kamailio/README.usrloc
+%doc %{_docdir}/kamailio/README.xlog
+
+%dir %{_sysconfdir}/kamailio
+%config(noreplace) %{_sysconfdir}/kamailio/*
+%config %{_sysconfdir}/init.d/*
+
+%dir %{_libdir}/kamailio
+%dir %{_libdir}/kamailio/modules
+%{_libdir}/kamailio/modules/acc.so
+%{_libdir}/kamailio/modules/alias_db.so
+%{_libdir}/kamailio/modules/auth.so
+%{_libdir}/kamailio/modules/auth_db.so
+%{_libdir}/kamailio/modules/auth_diameter.so
+%{_libdir}/kamailio/modules/avpops.so
+%{_libdir}/kamailio/modules/dbtext.so
+%{_libdir}/kamailio/modules/dispatcher.so
+%{_libdir}/kamailio/modules/diversion.so
+%{_libdir}/kamailio/modules/domain.so
+%{_libdir}/kamailio/modules/enum.so
+%{_libdir}/kamailio/modules/exec.so
+%{_libdir}/kamailio/modules/flatstore.so
+%{_libdir}/kamailio/modules/gflags.so
+%{_libdir}/kamailio/modules/group.so
+%{_libdir}/kamailio/modules/lcr.so
+%{_libdir}/kamailio/modules/mangler.so
+%{_libdir}/kamailio/modules/maxfwd.so
+%{_libdir}/kamailio/modules/mediaproxy.so
+%{_libdir}/kamailio/modules/msilo.so
+%{_libdir}/kamailio/modules/nathelper.so
+%{_libdir}/kamailio/modules/options.so
+%{_libdir}/kamailio/modules/path.so
+%{_libdir}/kamailio/modules/pdt.so
+%{_libdir}/kamailio/modules/permissions.so
+%{_libdir}/kamailio/modules/pike.so
+%{_libdir}/kamailio/modules/registrar.so
+%{_libdir}/kamailio/modules/rr.so
+%{_libdir}/kamailio/modules/siptrace.so
+%{_libdir}/kamailio/modules/sl.so
+%{_libdir}/kamailio/modules/sms.so
+%{_libdir}/kamailio/modules/speeddial.so
+%{_libdir}/kamailio/modules/statistics.so
+%{_libdir}/kamailio/modules/textops.so
+%{_libdir}/kamailio/modules/tm.so
+%{_libdir}/kamailio/modules/uac.so
+%{_libdir}/kamailio/modules/uac_redirect.so
+%{_libdir}/kamailio/modules/uri.so
+%{_libdir}/kamailio/modules/uri_db.so
+%{_libdir}/kamailio/modules/usrloc.so
+%{_libdir}/kamailio/modules/xlog.so
+
+%{_sbindir}/kamailio
+%{_sbindir}/kamctl
+%{_libdir}/kamctl/kamctl.base
+%{_libdir}/kamctl/kamctl.sqlbase
+%{_libdir}/kamctl/kamctl.ctlbase
+%{_libdir}/kamctl/kamctl.fifo
+%{_libdir}/kamctl/kamctl.unixsock
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+
+%files mysql
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.mysql
+
+%{_libdir}/kamailio/modules/mysql.so
+%{_sbindir}/kamailio_mysql.sh
+%{_libdir}/kamctl/kamctl.mysql
+
+%files postgres
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.postgres
+
+%{_libdir}/kamailio/modules/postgres.so
+%{_sbindir}/kamailio_postgres.sh
+%{_libdir}/kamctl/kamctl.pgsql
+
+%files unixodbc
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.unixodbc
+
+%{_libdir}/kamailio/modules/unixodbc.so
+
+%files jabber
+%defattr(-,root,root)
+%{_libdir}/kamailio/modules/jabber.so
+%doc %{_docdir}/kamailio/README.jabber
+
+%files cpl
+%defattr(-,root,root)
+%{_libdir}/kamailio/modules/cpl-c.so
+%doc %{_docdir}/kamailio/README.cpl-c
+
+%files pa
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/README.pa
+
+%{_libdir}/kamailio/modules/pa.so
+
+%files radius
+%defattr(-,root,root)
+%{_libdir}/kamailio/modules/auth_radius.so
+%{_libdir}/kamailio/modules/misc_radius.so
+%{_libdir}/kamailio/modules/peering.so
+%doc %{_docdir}/kamailio/README.auth_radius
+%doc %{_docdir}/kamailio/README.misc_radius
+%doc %{_docdir}/kamailio/README.peering
+
+
+%changelog
+
+* Fri Jun 30 2006 Bogdan-Andrei Iancu <bogdan at voice-system.ro>
+- version set to 1.1.0
+- added packages for pa, postgres and unixodbc
+- added dialog, lcr, options, path, siptrace, statistics modules
+
+* Thu Oct 27 2005 Daniel-Constantin Mierla <miconda at gmail.com>
+- version set to 1.0.0
+- added readme for flatstore
+- added uac and uac_redirect modules
+
+* Wed Jun 08 2005 Daniel-Constantin Mierla <miconda at gmail.com>
+- First version of the spec file.
diff --git a/pkg/kamailio/solaris/kamailio-manifest.xml b/pkg/kamailio/solaris/kamailio-manifest.xml
new file mode 100644
index 0000000..2ac2089
--- /dev/null
+++ b/pkg/kamailio/solaris/kamailio-manifest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+
+<!-- This is a manifest file to start, stop or restart the server automatically at
+     the Solaris 10 bootup. Setup and usage:
+     cp kamailio-manifest.xml to /var/svc/manifest/network/kamailio.xml
+     chmod 444 kamailio.xml
+     svccg -v import kamailio.xml
+     and finally enable the server to be a SMF service:
+     svcadm enable kamailio -->
+
+<service_bundle type='manifest' name='kamailio'>	
+	<service name='network/kamailio' type='service' version='1'>
+		<create_default_instance enabled='false' />
+		<single_instance/>
+
+		<dependency name='multi-user' grouping='require_all' restart_on='none' type='service'>
+			<service_fmri value='svc:/milestone/multi-user' />
+		</dependency>
+
+		<dependency name='multi-user-server' grouping='require_all' restart_on='none' type='service'>
+			<service_fmri value='svc:/milestone/multi-user-server' />
+		</dependency>
+
+		<dependency name='cswmysql5' grouping='require_all' restart_on='none' type='service'>
+			<!-- adapt if you use another mysql version -->
+			<service_fmri value='svc:/network/cswmysql5:default' />
+		</dependency>
+
+		<exec_method type='method' name='start' exec='/sbin/kamctl start' timeout_seconds='30' />
+
+		<exec_method type='method' name='stop' exec='/sbin/kamctl stop' timeout_seconds='60' /> 
+
+		<exec_method type='method' name='restart' exec='/sbin/kamctl restart' timeout_seconds='-1' />
+
+		<stability value='Unstable' />
+		<template>
+			<common_name>
+				<loctext xml:lang='C'> Kamailio </loctext> 
+			</common_name>
+		</template>
+	</service>
+</service_bundle>
diff --git a/pkg/kamailio/solaris/pkginfo b/pkg/kamailio/solaris/pkginfo
new file mode 100644
index 0000000..116657e
--- /dev/null
+++ b/pkg/kamailio/solaris/pkginfo
@@ -0,0 +1,9 @@
+PKG=Kamailio
+ARCH=sparc
+VERSION=1.2.0
+CATEGORY=application
+EMAIL=miconda at gmail.com
+NAME=Kamailio is a very fast and flexible SIP (RFC3261) proxy server
+SUNW_ISA=sparcv9
+BASEDIR=/usr/local
+CLASSES=none
diff --git a/pkg/kamailio/solaris/prototype b/pkg/kamailio/solaris/prototype
new file mode 100644
index 0000000..7b7da8d
--- /dev/null
+++ b/pkg/kamailio/solaris/prototype
@@ -0,0 +1,132 @@
+# $Id$
+i pkginfo=pkginfo
+d none etc 0755 bin bin
+d none etc/kamailio 0755 bin bin
+e none etc/kamailio/kamailio.cfg 0644 bin bin
+e none etc/kamailio/kamctlrc 0644 bin bin
+d none sbin 0755 bin bin
+f none sbin/kamailio 0755 bin bin
+f none sbin/kamctl 0755 bin bin
+f none sbin/kamailio_mysql.sh 0755 bin bin
+d none lib 0755 bin bin
+d none lib/kamailio 2755 bin bin
+d none lib/kamailio/modules 2755 bin bin
+f none lib/kamailio/modules/acc.so 0755 bin bin
+f none lib/kamailio/modules/alias_db.so 0755 bin bin
+f none lib/kamailio/modules/auth.so 0755 bin bin
+f none lib/kamailio/modules/auth_db.so 0755 bin bin
+f none lib/kamailio/modules/auth_diameter.so 0755 bin bin
+f none lib/kamailio/modules/avpops.so 0755 bin bin
+f none lib/kamailio/modules/dbtext.so 0755 bin bin
+f none lib/kamailio/modules/dialog.so 0755 bin bin
+f none lib/kamailio/modules/dispatcher.so 0755 bin bin
+f none lib/kamailio/modules/diversion.so 0755 bin bin
+f none lib/kamailio/modules/domain.so 0755 bin bin
+f none lib/kamailio/modules/domainpolicy.so 0755 bin bin
+f none lib/kamailio/modules/enum.so 0755 bin bin
+f none lib/kamailio/modules/exec.so 0755 bin bin
+f none lib/kamailio/modules/flatstore.so 0755 bin bin
+f none lib/kamailio/modules/gflags.so 0755 bin bin
+f none lib/kamailio/modules/group.so 0755 bin bin
+f none lib/kamailio/modules/lcr.so 0755 bin bin
+f none lib/kamailio/modules/jabber.so 0755 bin bin
+f none lib/kamailio/modules/mangler.so 0755 bin bin
+f none lib/kamailio/modules/maxfwd.so 0755 bin bin
+f none lib/kamailio/modules/mediaproxy.so 0755 bin bin
+f none lib/kamailio/modules/mi_fifo.so 0755 bin bin
+f none lib/kamailio/modules/msilo.so 0755 bin bin
+f none lib/kamailio/modules/mysql.so 0755 bin bin
+f none lib/kamailio/modules/nathelper.so 0755 bin bin
+f none lib/kamailio/modules/options.so 0755 bin bin
+f none lib/kamailio/modules/path.so 0755 bin bin
+f none lib/kamailio/modules/pdt.so 0755 bin bin
+f none lib/kamailio/modules/permissions.so 0755 bin bin
+f none lib/kamailio/modules/pike.so 0755 bin bin
+f none lib/kamailio/modules/registrar.so 0755 bin bin
+f none lib/kamailio/modules/rr.so 0755 bin bin
+f none lib/kamailio/modules/seas.so 0755 bin bin
+f none lib/kamailio/modules/siptrace.so 0755 bin bin
+f none lib/kamailio/modules/sl.so 0755 bin bin
+f none lib/kamailio/modules/sms.so 0755 bin bin
+f none lib/kamailio/modules/speeddial.so 0755 bin bin
+f none lib/kamailio/modules/sst.so 0755 bin bin
+f none lib/kamailio/modules/statistics.so 0755 bin bin
+f none lib/kamailio/modules/textops.so 0755 bin bin
+f none lib/kamailio/modules/tm.so 0755 bin bin
+f none lib/kamailio/modules/uac.so 0755 bin bin
+f none lib/kamailio/modules/uac_redirect.so 0755 bin bin
+f none lib/kamailio/modules/uri.so 0755 bin bin
+f none lib/kamailio/modules/uri_db.so 0755 bin bin
+f none lib/kamailio/modules/usrloc.so 0755 bin bin
+f none lib/kamailio/modules/xlog.so 0755 bin bin
+f none lib/kamailio/modules/xmpp.so 0755 bin bin
+d none lib/kamctl 0644 bin bin
+f none lib/kamctl/kamctl.base 0644 bin bin
+f none lib/kamctl/kamctl.ctlbase 0644 bin bin
+f none lib/kamctl/kamctl.sqlbase 0644 bin bin
+f none lib/kamctl/kamctl.fifo 0644 bin bin
+f none lib/kamctl/kamctl.unixsock 0644 bin bin
+f none lib/kamctl/kamctl.mysql 0644 bin bin
+d none doc 0755 bin bin
+d none doc/kamailio 0755 bin bin
+f none doc/kamailio/README 0644 bin bin
+f none doc/kamailio/INSTALL 0644 bin bin
+f none doc/kamailio/README-MODULES 0644 bin bin
+f none doc/kamailio/AUTHORS 0644 bin bin
+f none doc/kamailio/NEWS    0644 bin bin
+f none doc/kamailio/README.acc 0644 bin bin
+f none doc/kamailio/README.alias_db 0644 bin bin
+f none doc/kamailio/README.auth 0644 bin bin
+f none doc/kamailio/README.auth_db 0644 bin bin
+f none doc/kamailio/README.auth_diameter 0644 bin bin
+f none doc/kamailio/README.avpops 0644 bin bin
+f none doc/kamailio/README.dbtext  0644 bin bin
+f none doc/kamailio/README.dialog  0644 bin bin
+f none doc/kamailio/README.dispatcher  0644 bin bin
+f none doc/kamailio/README.diversion  0644 bin bin
+f none doc/kamailio/README.domain  0644 bin bin
+f none doc/kamailio/README.domainpolicy  0644 bin bin
+f none doc/kamailio/README.enum    0644 bin bin
+f none doc/kamailio/README.exec 0644 bin bin
+f none doc/kamailio/README.flatstore 0644 bin bin
+f none doc/kamailio/README.gflags 0644 bin bin
+f none doc/kamailio/README.group 0644 bin bin
+f none doc/kamailio/README.jabber 0644 bin bin
+f none doc/kamailio/README.lcr 0644 bin bin
+f none doc/kamailio/README.mangler 0644 bin bin
+f none doc/kamailio/README.maxfwd 0644 bin bin
+f none doc/kamailio/README.mediaproxy 0644 bin bin
+f none doc/kamailio/README.mi_fifo 0644 bin bin
+f none doc/kamailio/README.msilo 0644 bin bin
+f none doc/kamailio/README.mysql 0644 bin bin
+f none doc/kamailio/README.nathelper 0644 bin bin
+f none doc/kamailio/README.options 0644 bin bin
+f none doc/kamailio/README.path 0644 bin bin
+f none doc/kamailio/README.pdt 0644 bin bin
+f none doc/kamailio/README.permissions 0644 bin bin
+f none doc/kamailio/README.pike 0644 bin bin
+f none doc/kamailio/README.registrar 0644 bin bin
+f none doc/kamailio/README.rr 0644 bin bin
+f none doc/kamailio/README.siptrace 0644 bin bin
+f none doc/kamailio/README.seas 0644 bin bin
+f none doc/kamailio/README.sl 0644 bin bin
+f none doc/kamailio/README.sms 0644 bin bin
+f none doc/kamailio/README.speeddial 0644 bin bin
+f none doc/kamailio/README.statistics 0644 bin bin
+f none doc/kamailio/README.sst 0644 bin bin
+f none doc/kamailio/README.textops 0644 bin bin
+f none doc/kamailio/README.tm 0644 bin bin
+f none doc/kamailio/README.uac 0644 bin bin
+f none doc/kamailio/README.uac_redirect 0644 bin bin
+f none doc/kamailio/README.uri 0644 bin bin
+f none doc/kamailio/README.uri_db 0644 bin bin
+f none doc/kamailio/README.usrloc 0644 bin bin
+f none doc/kamailio/README.xlog 0644 bin bin
+f none doc/kamailio/README.xmpp 0644 bin bin
+d none man 0755 bin bin
+d none man/man8 0755 bin bin
+f none man/man8/kamailio.8 0644 bin bin
+f none man/man8/kamctl.8 0644 bin bin
+f none man/man8/kamunix.8 0644 bin bin
+d none man/man5 0755 bin bin
+f none man/man5/kamailio.cfg.5 0644 bin bin
diff --git a/pkg/ser/deb/debian/changelog b/pkg/ser/deb/debian/changelog
new file mode 100644
index 0000000..a5bdbf4
--- /dev/null
+++ b/pkg/ser/deb/debian/changelog
@@ -0,0 +1,156 @@
+ser (2.99.0-dev1.1) unstable; urgency=low
+
+  * Updated the build dependencies with the doc building tools:
+    docbook2x, xsltproc and lynx.
+
+ -- Andrei Pelinescu - Onciul <andrei at ape.fokus.gmd.de>  Mon, 30 Aug 2010 23:15:18 +0200
+
+ser (2.99.0-dev01) unstable; urgency=low
+
+  * Added the ser-db-modules package, containing database using modules and
+    basic DB drivers (db_text and db_flatstore).
+  * The ser-mysql-modules and ser-postgres-modules contain now only the DB
+    drivers and depend on ser-db-modules.
+  * Various minor packaging problems fixed.
+
+ -- Andrei Pelinescu-Onciul <andrei at iptel.org>  Wed, 09 Jul 2009 15:37:00 +0200
+
+ser (2.99.0-dev01) unstable; urgency=low
+
+  * Update Debian specification for sip-router.
+
+ -- Andrei Pelinescu-Onciul <andrei at iptel.org>  Wed, 08 Jul 2009 14:13:11 +0200
+
+ser (2.1.0-0dev15) unstable; urgency=low
+
+  * Added installation of *.sql files for ser_mysql.sh script.
+  * Added ser-ai1 meta-package.
+
+ -- Pavel Kasparek <pavel at iptel.org>  Mon, 10 Dec 2007 12:53:46 +0100
+
+ser (2.1.0-0dev12) unstable; urgency=low
+
+  * Updated Debian specification for cvs HEAD version.
+
+ -- Pavel Kasparek <pavel at iptel.org>  Wed, 31 Oct 2007 13:35:40 +0100
+
+ser (2.0.0-0rc5.7) unstable; urgency=low
+
+  * Updated Debian specification for upcoming SER 2.0.0 version.
+
+ -- Pavel Kasparek <pavel at iptel.org>  Tue, 11 Sep 2007 12:08:05 +0200
+
+ser (0.9.4-0.2) unstable; urgency=low
+
+  * minor debian rules clean target fix 
+
+ -- Andrei Pelinescu-Onciul <andrei at iptel.org>  Wed, 02 Nov 2005 17:46:55 +0200
+
+ser (0.9.4-0.1) unstable; urgency=low
+
+  * new upstream minor release 
+
+ -- Andrei Pelinescu-Onciul <andrei at iptel.org>  Fri, 02 Sep 2005 14:49:37 +0200
+
+ser (0.9.3-0.2) unstable; urgency=low
+
+  * missing init.d/ser fixed 
+
+ -- Andrei Pelinescu-Onciul <andrei at iptel.org>  Tue, 28 Jun 2005 23:56:05 +0200
+
+ser (0.9.3-0.1) unstable; urgency=low
+
+  * new upstream release 
+  * added ser-cpl-module, ser-pa-module, ser-postgres-module,
+    ser-acc-db-module and ser-acc-radius-module
+  * ser-radius-modules depend now on libradiusclient-ng2 
+    (not in official Debian archives)
+
+ -- Andrei Pelinescu-Onciul <andrei at iptel.org>  Thu, 23 Jun 2005 16:43:35 +0200
+
+ser (0.8.14) unstable; urgency=low
+
+  * new upstream release 
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.fraunhofer.de>  Fri, 23 Jul 2004 16:00:04 +0200
+
+ser (0.8.12) unstable; urgency=low
+
+  * new upstream release (improved tcp support, set_advertised_address a.s.o)
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.fraunhofer.de>  Fri, 14 Nov 2003 16:41:05 +0200
+
+ser (0.8.11) unstable; urgency=low
+
+  * new upstream release
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.fraunhofer.de>  Wed, 27 Aug 2003 14:53:24 +0200
+
+ser (0.8.11-pre34) unstable; urgency=low
+
+  * minor bugfixes
+
+  * debian packaging changes (debhelper 4.0, init & postinst cleanups, added
+    examples, a.s.o)
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.fraunhofer.de>  Fri, 27 Jun 2003 15:14:52 +0200
+
+ser (0.8.11-pre30) unstable; urgency=low
+
+  * minor bugfixes
+
+  * debian packaging changes (added conflicts)
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.fraunhofer.de>  Fri, 06 Jun 2003 14:03:29 +0200
+
+ser (0.8.11-pre29) unstable; urgency=low
+
+  * RFC3261 support (TCP, loose routing)
+
+  * lots of new modules:  rich access control lists (permissions), database in
+    textfile support (dbtext), presence agent (pa), enum support (enum),
+    voicemail interface (vm), NAT traversal utility for Cisco/ATA NAT
+    (nathelper)
+
+  * arhitectural  improvements
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.fraunhofer.de>  Fri, 30 May 2003 18:11:52 +0200
+
+ser (0.8.10) unstable; urgency=low
+
+ * fixes lots of  bugs in 0.8.9 (log not working, ipv6 address conversion)
+
+ * introduces port support in uri matching with myself
+
+ * faster hash function (statefull performance increase ~10%)
+
+ * modules updates (sms, jabber)
+
+ * the jabber module is in a separate package now (it depends on libexpat)
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>  Tue, 4 Nov 2002 17:23:37 +0200
+
+ser (0.8.9) unstable; urgency=low
+
+  * fixes a few bugs in 0.8.8 (primary some modules which where linked to some bad libs)
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>  Wed, 7 Oct 2002 16:49:05 +0200
+
+ser (0.8.8) unstable; urgency=low
+
+  * first release (really this time)
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>  Wed, 25 Sep 2002 23:27:11 +0200
+
+ser (0.8.7.16) unstable; urgency=low
+
+  * First Public Release.
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>  Tue, 24 Sep 2002 21:33:39 +0200
+
+ser (0.8.7.6-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>  Tue, 16 Jul 2002 15:41:31 +0200
+
diff --git a/pkg/ser/deb/debian/compat b/pkg/ser/deb/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/pkg/ser/deb/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/pkg/ser/deb/debian/control b/pkg/ser/deb/debian/control
new file mode 100644
index 0000000..1931d1b
--- /dev/null
+++ b/pkg/ser/deb/debian/control
@@ -0,0 +1,117 @@
+Source: ser
+Section: net
+Priority: optional
+Maintainer: Andrei Pelinescu-Onciul <andrei at iptel.org>
+Build-Depends: debhelper (>= 4), libmysqlclient-dev | libmysqlclient15-dev | libmysqlclient14-dev | libmysqlclient12-dev, libexpat1-dev, libradius-ng-dev | libradiusclient-ng-dev, libxml2-dev, libpq-dev | postgresql-dev, libcurl3-dev, libssl-dev, libreadline5-dev, libpcre3-dev, bison, flex, docbook2x,
+ xsltproc, lynx
+Standards-Version: 3.5.2
+
+Package: ser
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Suggests: ser-mysql-modules, ser-jabber-module, ser-cpl-module, ser-presence-modules, ser-radius-modules
+Conflicts: ser-mysql-module (<< ${Source-Version}), ser-jabber-module (<< ${Source-Version}), ser-radius-modules (<< ${Source-Version}), ser-cpl-module (<< ${Source-Version}), ser-presence-modules (<< ${Source-Version}), ser-postgres-module (<< ${Source-Version}), ser-acc-db-module (<< ${Source-Version}), ser-acc-radius-module (<< ${Source-Version})
+Description: Sip Express Router, very fast and configurable SIP proxy
+ ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+ proxy server. Written entirely in C, ser can handle thousands calls
+ per second even on low-budget hardware. C Shell like scripting language
+ provides full control over the server's behaviour. It's modular
+ architecture allows only required functionality to be loaded.
+ Currently the following modules are available: Digest Authentication,
+ CPL scripts, Instant Messaging, MySQL support, Presence Agent, Radius
+ Authentication, Record Routing, SMS Gateway, Jabber Gateway, Transaction 
+ Module, Registrar and User Location.
+
+Package: ser-db-modules
+Architecture: any
+Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+Suggests: ser-mysql-module, ser-postgres-module
+Conflicts: ser-mysql-modules
+Description: contains generic DB support and modules using a DB
+ These modules will enable usage of various DB related functionality.
+ Note that only basic DB drivers are included in this package (db_text and
+ db_flatstore). You probably want to install a more advanced db driver, like
+ the ones provided in ser-mysql-modules or ser-postgres-module packages.
+
+Package: ser-mysql-module
+Architecture: any
+Depends: ${shlibs:Depends}, ser (= ${Source-Version}), ser-db-modules (= ${Source-Version})
+Description: contains the MySQL database driver module
+ This package will enable using a MySQL database with ser.
+
+#Package: ser-jabber-module
+#Architecture: any
+#Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+#Description: contains the Jabber module (SIP-Jabber message translation)
+# This has been split out of the main ser package, so that ser will not
+# depend upon libexpat. This module will enable you to use ser to translate
+# SIP messages into Jabber messages.
+
+#Package: ser-cpl-module
+#Architecture: any
+#Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+#Description: contains the cpl-c module (CPL support)
+# This has been split out of the main ser package, so that ser will not
+# depend upon libxml2.
+
+#Package: ser-presence-modules
+#Architecture: any
+#Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+#Description: contains the SIMPLE based presence support (Presence server)
+# This module contains modules and libraries needed to implement SIMPLE
+# based presence support in SER
+
+Package: ser-radius-modules
+Architecture: any
+Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+Description: contains the ser RADIUS modules 
+ This has been split out of the main ser package, so that ser will not
+ depend upon libradius1. This modules will enable you to authenticate, 
+ do group membership checking or check the messages uris using RADIUS.
+
+Package: ser-postgres-module
+Architecture: any
+Depends: ${shlibs:Depends}, ser (= ${Source-Version}), ser-db-modules (= ${Source-Version})
+Description: contains the PostgreSQL database driver module
+ This package will enable using a PostgreSQL database with ser.
+
+Package: ser-tls-module
+Architecture: any
+Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+Description: contains the TLS ser transport module
+ This has been split out of the main ser package, so that ser will not
+ depend on openssl. This module will enable you to use the TLS transport.
+
+Package: ser-xmlrpc-module
+Architecture: any
+Depends: ${shlibs:Depends}, ser (= ${Source-Version})
+Description: contains the XML-RPC based interface to SER
+ This module provides XML-RPC administrative interface to SER. The
+ interface can be used to change various configuration options of
+ SER at runtime. Other applications, such as serctl command line
+ tools and SERWeb use XML-RPC interface to communicate with SER
+
+Package: ser-oob
+Architecture: any
+Depends: ser, ser-mysql-modules, ser-xmlrpc-module, serctl
+Suggests: rttpproxy, logrotate, ngrep, ntp
+Description: Sip Express Router - package for "out of the box" installation
+ This package conatins advanced configuration file for ser - SIP Express Router
+ and depends on ser and all needed ser modules. It can be used for easy installation 
+ of ser "out of the box".
+
+Package: ser-nth
+Architecture: any
+Depends: screen, gdb, binutils, gcc, bison, flex, ngrep, tcpdump, iftop, lsof, psmisc, vim, bvi, most, serctl, mc, sipsak
+Description: Sip Express Router - package for "nice to have" installation
+ This is a meta-package for easy installation various useful tools that may be
+ handy on server with SER installed.
+
+Package: ser-ai1
+Architecture: any
+Depends: ser-oob, mysql-server, rtpproxy, mystun, sipsak, tcpdump, ngrep, iftop, serweb, sems
+Suggests: ser-nth
+Description: Sip Express Router - package for "all in one" installation
+ This is a meta-package for easy installation of complete server running ser - SIP Express
+ Router, rtpproxy -  RTP relay, mystun - STUN server and mysql server.
+
diff --git a/pkg/ser/deb/debian/copyright b/pkg/ser/deb/debian/copyright
new file mode 100644
index 0000000..76fff62
--- /dev/null
+++ b/pkg/ser/deb/debian/copyright
@@ -0,0 +1,19 @@
+This package was debianized by Andrei Pelinescu-Onciul
+<pelinescu-onciul at fokus.fraunhofer.de> on Tue, 16 Jul 2002 15:41:31 +0200.
+
+It was downloaded from http://iptel.org/ser.
+
+Upstream Authors: Andrei Pelinescu-Onciul
+<pelinescu-onciul at fokus.fraunhofer.de>, Bogdan Iancu
+<iancu at fokus.fraunhofer.de>, Daniel-Constantin Mierla, Jan Janak
+<jan at iptel.org>, Jiri Kuthan <jiri at iptel.org>, Juha Heinanen, Maxim
+Sobolev, Miklos Tirpak, Nils Ohlmeier, Ramona-Elena Modroiu, Raphael Coeffic,
+Ricardo Baratto, Stelios Sidiroglou-Douskos  (see AUTHORS file for details)
+
+This software is copyright (c) 2002-2003 by FhG Fokus
+
+You are free to distribute this software under the terms of
+the GNU General Public License.
+
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file `/usr/share/common-licenses/GPL.
diff --git a/pkg/ser/deb/debian/cron.d.ex b/pkg/ser/deb/debian/cron.d.ex
new file mode 100644
index 0000000..b7d2235
--- /dev/null
+++ b/pkg/ser/deb/debian/cron.d.ex
@@ -0,0 +1,4 @@
+#
+# Regular cron jobs for the ser-0.8.7 package
+#
+0 4	* * *	root	ser-0.8.7_maintenance
diff --git a/pkg/ser/deb/debian/ex.package.doc-base b/pkg/ser/deb/debian/ex.package.doc-base
new file mode 100644
index 0000000..4600109
--- /dev/null
+++ b/pkg/ser/deb/debian/ex.package.doc-base
@@ -0,0 +1,22 @@
+Document: ser-0.8.7
+Title: Debian ser-0.8.7 Manual
+Author: <insert document author here>
+Abstract: This manual describes what ser-0.8.7 is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/ser-0.8.7/ser-0.8.7.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/ser-0.8.7/ser-0.8.7.ps.gz
+
+Format: text
+Files: /usr/share/doc/ser-0.8.7/ser-0.8.7.text.gz
+
+Format: HTML
+Index: /usr/share/doc/ser-0.8.7/html/index.html
+Files: /usr/share/doc/ser-0.8.7/html/*.html
+
+  
diff --git a/pkg/ser/deb/debian/manpage.1.ex b/pkg/ser/deb/debian/manpage.1.ex
new file mode 100644
index 0000000..cf44cd4
--- /dev/null
+++ b/pkg/ser/deb/debian/manpage.1.ex
@@ -0,0 +1,60 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH SER-0.8.7 SECTION "July 16, 2002"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+ser-0.8.7 \- program to do something
+.SH SYNOPSIS
+.B ser-0.8.7
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B ser-0.8.7
+and
+.B bar
+commands.
+This manual page was written for the Debian distribution
+because the original program does not have a manual page.
+Instead, it has documentation in the GNU Info format; see below.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBser-0.8.7\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+This manual page was written by Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/pkg/ser/deb/debian/manpage.sgml.ex b/pkg/ser/deb/debian/manpage.sgml.ex
new file mode 100644
index 0000000..b7e7923
--- /dev/null
+++ b/pkg/ser/deb/debian/manpage.sgml.ex
@@ -0,0 +1,152 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+     less'.  A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+	docbook-to-man $< > $@
+
+    
+	The docbook-to-man binary is found in the docbook-to-man package.
+	Please remember that if you create the nroff version in one of the
+	debian/rules file targets (such as build), you will need to include
+	docbook-to-man in your Build-Depends control field.
+
+  -->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
+  <!ENTITY dhsurname   "<surname>SURNAME</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>July 16, 2002</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>SECTION</manvolnum>">
+  <!ENTITY dhemail     "<email>pelinescu-onciul at fokus.gmd.de</email>">
+  <!ENTITY dhusername  "Andrei Pelinescu-Onciul">
+  <!ENTITY dhucpackage "<refentrytitle>SER-0.8.7</refentrytitle>">
+  <!ENTITY dhpackage   "ser-0.8.7">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2002</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>program to do something</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option>-e <replaceable>this</replaceable></option></arg>
+
+      <arg><option>--example <replaceable>that</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> and <command>bar</command>
+      commands.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in the &gnu;
+      <application>Info</application> format; see below.</para>
+
+    <para><command>&dhpackage;</command> is a program that...</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual GNU command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below.  For a complete description, see the
+      <application>Info</application> files.</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-v</option>
+          <option>--version</option>
+        </term>
+        <listitem>
+          <para>Show version of program.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>bar (1), baz (1).</para>
+
+    <para>The programs are documented fully by <citetitle>The Rise and
+      Fall of a Fooish Bar</citetitle> available via the
+      <application>Info</application> system.</para>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the <acronym>GNU</acronym> Free Documentation
+      License, Version 1.1 or any later version published by the Free
+      Software Foundation; with no Invariant Sections, no Front-Cover
+      Texts and no Back-Cover Texts.</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
diff --git a/pkg/ser/deb/debian/postinst b/pkg/ser/deb/debian/postinst
new file mode 100644
index 0000000..de0f5d1
--- /dev/null
+++ b/pkg/ser/deb/debian/postinst
@@ -0,0 +1,182 @@
+#!/bin/sh
+
+set -e
+
+# don't do anything when called with other argument than configure 
+case "$1" in
+  configure)
+  ;;  
+  abort-upgrade|abort-remove|abort-deconfigure)
+    exit 0
+  ;;
+  *)
+    echo "postinst called with unknown argument \$1'" >&2
+    exit 1
+  ;;
+esac
+
+. /usr/share/debconf/confmodule
+
+# add ser user
+adduser --quiet --system --group --disabled-password --shell /bin/false \
+--gecos "SIP Express Router" --home /var/run/ser ser || true
+
+if [ -d /usr/doc -a ! -e /usr/doc/ser -a -d /usr/share/doc/ser ]; then
+  ln -sf ../share/doc/ser /usr/doc/ser
+fi
+
+
+# ser defaults file, which will be modified by this script
+DEFAULTFILE=/etc/default/ser
+
+if ! test -e $DEFAULTFILE; then
+  echo "Warning: ser postinst script can't find config file $DEFAULTFILE. Configuration aborted."
+  exit 0
+fi
+
+# ----------------------------------------------------------------------
+
+fn_config_replace ()
+{
+	if test $# -ne 2; then
+	  echo "Error - bad number of input parameters"
+	  echo "usage:"
+	  echo "fn_config_replace config_file CFG_OPTION_something" 
+	  exit 1
+	fi
+
+	FILENAME="$1"
+	ITEM="$2"
+
+	echo "Changing config option $ITEM."
+	OLDFILE="$FILENAME.config_replace_bck"
+	cp -f $FILENAME $OLDFILE
+
+	REPLACEMENT="$FILENAME.repl"
+	TEMPFILE="$FILENAME.temp"
+	TAIL="$FILENAME.tail"
+
+	rm -f $REPLACEMENT
+	touch $REPLACEMENT # needed if the input is empty
+	while read -r LINE
+	do
+	  echo "$LINE" >> $REPLACEMENT
+	done
+
+	STARTPOS=`nl -b a $FILENAME | grep -w "DEBCONF-$ITEM-START" | sed -e "s/^ *\([0-9]*\).*/\1/g"`
+	if [ "$STARTPOS" == "" ]; then
+		echo "WARNING: section $ITEM not found"
+		return
+	fi
+		
+	ENDPOS=`nl -b a $FILENAME | sed -e "1,${STARTPOS}d" | grep "DEBCONF-$ITEM-END" | head -n 1 | sed -e "s/^ *\([0-9]*\).*/\1/g"`
+	if [ "$STARTPOS" == "" ]; then
+		echo "WARNING: end of section $ITEM not found"
+		return
+	fi
+	ENDPOS=$(($ENDPOS-1))
+	STARTPOS=$(($STARTPOS+1))
+
+	cat $FILENAME | sed -e "1,${ENDPOS}d" > $TAIL
+	cat $FILENAME | sed -e "${STARTPOS},\$d" > $TEMPFILE
+	cat $REPLACEMENT >> $TEMPFILE
+	cat $TAIL >> $TEMPFILE
+	rm -f $TAIL
+	mv -f $TEMPFILE $FILENAME
+}
+
+# pads $1 with as many empty rows as needed until $2 lines are complete
+padLines() {
+	output="$1"
+	needed="$2"
+	num=`echo "$output" | wc -l`
+	echo "$output"
+	moreneeded=$(($needed-$num))
+	while (true); do
+	if [ $moreneeded -gt 0 ]
+	then
+		echo ""
+		moreneeded=$(($moreneeded-1))
+	else
+		break
+	fi
+	done
+}
+
+#----------------------------------------------------------------------------
+
+
+db_get ser/config
+if [ "$RET" = "false" ] ; then
+  # do not change config file
+  echo "Package ser postinstall script: NOT modifying config file $DEFAULTFILE."
+else
+
+BACKUP="$DEFAULTFILE.config_bck"
+
+echo "Package ser postinstall script: MODIFYING config file $DEFAULTFILE."
+echo "Creating backup copy as $BACKUP"
+cp -f $DEFAULTFILE $BACKUP
+
+db_get ser/USER
+if test "$RET" != "!" ; then
+  fn_config_replace $DEFAULTFILE USER <<+++
+SER_USER="$RET"
++++
+fi
+
+db_get ser/GROUP
+if test "$RET" != "!" ; then
+  fn_config_replace $DEFAULTFILE GROUP <<+++
+SER_GROUP="$RET"
++++
+fi
+
+db_get ser/WORKDIR
+if test "$RET" != "!" ; then
+  fn_config_replace $DEFAULTFILE WORKDIR <<+++
+SER_WORKDIR="$RET"
++++
+fi
+
+db_get ser/KERNEL_CORE_PID
+if test "$RET" != "!" ; then
+  fn_config_replace $DEFAULTFILE KERNEL_CORE_PID <<+++
+SER_KERNEL_CORE_PID="$RET"
++++
+fi
+
+db_get ser/MEMORY
+if test "$RET" != "!" ; then
+  fn_config_replace $DEFAULTFILE MEMORY <<+++
+SER_MEMORY="$RET"
++++
+fi
+
+fi # if changing config
+
+echo ""
+echo "***"
+echo "Configuration of ser has finished."
+echo ""
+echo "To restart it when configuration has changed use '/etc/init.d/ser restart'"
+echo ""
+echo "To change it's configuration use 'dpkg-reconfigure ser'"
+echo "***"
+echo ""
+
+echo "Setting ser to start automatically"
+/usr/sbin/update-rc.d ser defaults || true
+
+
+if [ -x "/etc/init.d/ser" ]; then
+  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+    invoke-rc.d ser restart || exit 0
+  else
+    /etc/init.d/ser restart || exit 0
+  fi
+fi
+                                                                
+
+exit 0
+
diff --git a/pkg/ser/deb/debian/postrm b/pkg/ser/deb/debian/postrm
new file mode 100644
index 0000000..eb08756
--- /dev/null
+++ b/pkg/ser/deb/debian/postrm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+if [ "$1" = "purge" ] ; then
+  # remove user/group on purge
+  deluser --quiet --remove-home ser &>/dev/null || true
+  # remove /etc/ser if empty
+  rmdir /etc/ser || true
+fi
+
+exit 0
+
diff --git a/pkg/ser/deb/debian/preinst.ex b/pkg/ser/deb/debian/preinst.ex
new file mode 100644
index 0000000..d5c9921
--- /dev/null
+++ b/pkg/ser/deb/debian/preinst.ex
@@ -0,0 +1,44 @@
+#! /bin/sh
+# preinst script for ser-0.8.7
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/ser-0.8.7.pid  \
+#                --exec /usr/sbin/ser-0.8.7 2>/dev/null || true
+#        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/pkg/ser/deb/debian/prerm b/pkg/ser/deb/debian/prerm
new file mode 100644
index 0000000..2626f71
--- /dev/null
+++ b/pkg/ser/deb/debian/prerm
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "upgrade"; then
+  exit 0
+fi
+
+#DEBHELPER#
+
+
+exit 0
+
+
diff --git a/pkg/ser/deb/debian/prerm.ex b/pkg/ser/deb/debian/prerm.ex
new file mode 100644
index 0000000..77a79f5
--- /dev/null
+++ b/pkg/ser/deb/debian/prerm.ex
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for ser-0.8.7
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/ser-0.8.7.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/pkg/ser/deb/debian/rules b/pkg/ser/deb/debian/rules
new file mode 100755
index 0000000..7b1f18d
--- /dev/null
+++ b/pkg/ser/deb/debian/rules
@@ -0,0 +1,243 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+#
+# $Id$
+#
+# History:
+# --------
+#  2003-05-30  updated for the 0.8.11 release, changed modules list and
+#              some ser make options (andrei)
+#  2003-06-27  changed to DH_COMPAT 4 (debian/compat) + other filenames
+#              & small fixes (andrei)
+#  2003-08-29  replaced modules-install with modules-install-all, to 
+#               install also the modules doc (andrei)
+#  2004-07-23  added ext and commented out the radius modules
+#              (the current radius modules depend on radiusclient-ng which
+#               is not yet part of debian)  (andrei)
+#  2005-06-23  added cpl-c, pa & re-enabled radius (with libradiusclient-ng)
+#                (andrei)
+#  2007-09-11  updated for ser 2.0.0 and Debian Etch
+#              presence modules commented out (can't be compiled due to some bug in Makefile)
+#              added /etc/defaults/ser file installation
+#              added ser-oob package
+#                (pavel)
+#  2007-10-31  updated for cvs head (pavel)
+#  2009-07-08  updated for sip-router (andrei)
+
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+# export DH_COMPAT=4
+#  -- already set in compat
+#  force no striping (always include debug symbols for now)
+export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) nostrip"
+
+# modules not in the "main" ser package
+EXCLUDED_MODULES=jabber xmlrpc cpl-c
+
+# extra modules to skip, because they are not compilable now
+# - regardless if they go to the main ser package or to some module package,
+# they will be excluded from compile and install of all
+EXTRA_EXCLUDED_MODULES=seas bdb dbtext oracle pa rls iptrtpproxy
+#EXTRA_EXCLUDED_MODULES=
+
+# possible module directories that can appear in MODULES_SP
+# (only used for deducing a module name)
+MDIRS=modules modules_s modules_k
+
+# modules packaged in separate packages (complete with full modules_* path)
+# with the package name: ser-$(module_name)-module
+MODULES_SP=modules/db_mysql modules/db_postgres modules/tls modules/xmlrpc
+
+# module groups that are packaged in seperate packages
+# (with the name ser-$(group_name)-modules)
+# Note: the order is important (should be in dependency order, the one
+# on which other depend first)
+PACKAGE_GROUPS=db radius
+
+# directories with possible duplicate libraries (that should be deleted
+# from current module* packages)
+DUP_LIBS_DIRS=$(CURDIR)/debian/ser/usr/lib/ser \
+			$(CURDIR)/debian/ser-db-modules/usr/lib/ser
+
+# modules names out of modules sp
+MODULES_SP_NAMES=$(filter-out $(MDIRS),$(subst /, ,$(MODULES_SP)))
+
+# "function" to get package short name out of a dir/module_name
+# it also transforms db_foo into foo
+mod_name=$(subst db_,,$(lastword $(subst /, ,$(1))))
+
+define PACKAGE_GRP_BUILD_template
+	# package all the modules in PACKAGE_GROUPS in separate packages
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) every-module group_include="$(grp)"
+	)
+endef
+
+
+define PACKAGE_MODULE_BUILD_template
+	# package all the modules MODULES_SP in separate packages
+	$(foreach mod,$(MODULES_SP),\
+		$(MAKE) modules modules="$(mod)"
+	)
+endef
+
+
+define PACKAGE_GRP_INSTALL_template
+	$(foreach grp,$(PACKAGE_GROUPS),\
+		$(MAKE) install-modules-all group_include="$(grp)" \
+			basedir=$(CURDIR)/debian/ser-$(grp)-modules \
+			cfg_prefix=$(CURDIR)/debian/ser-$(grp)-modules \
+			doc-dir=share/doc/ser-$(grp)-modules
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/ser-$(grp)-modules/usr/lib/ser" &&\
+			for r in $$d/lib*; do \
+				echo "removing $(grp) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/ser-$(grp)-modules/usr/lib/ser/`basename "$$r"` ; \
+			done ; \
+		done
+	)
+endef
+
+
+define PACKAGE_MODULE_INSTALL_template
+	$(foreach mod,$(MODULES_SP),
+		$(MAKE) install-modules-all modules="$(mod)" \
+				modules_s="" modules_k="" \
+				basedir=$(CURDIR)/debian/ser-$(call mod_name,$(mod))-module \
+				doc-dir=share/doc/ser-$(call mod_name,$(mod))-module
+		# eliminate duplicate libs
+		-for d in $(DUP_LIBS_DIRS); do \
+			test "$$d" != "$(CURDIR)/debian/ser-$(call mod_name,$(mod))-module/usr/lib/ser" &&\
+			for r in $$d/lib*; do \
+				echo "removing $(call mod_name, $(mod)) lib `basename $$r` present also in $$d";\
+				rm -f $(CURDIR)/debian/ser-$(call mod_name,$(mod))-module/usr/lib/ser/`basename "$$r"` ; \
+			done ; \
+		done
+	)
+endef
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	$(MAKE) cfg prefix=/usr cfg_prefix=$(CURDIR)/debian/ser \
+			cfg_target=/etc/ser/ \
+			basedir=$(CURDIR)/debian/ser \
+			skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \
+			group_include="standard"
+
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE) all
+	# make groups
+	$(call PACKAGE_GRP_BUILD_template)
+	# make single-module packages
+	$(call PACKAGE_MODULE_BUILD_template)
+	#/usr/bin/docbook-to-man debian/ser.sgml > ser.1
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# Add here commands to clean up after the build process.
+	-$(MAKE) maintainer-clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	# Add here commands to install the package into debian/ser
+	$(MAKE) install group_include="standard"
+	# fix etc/ser dir location -- not needed -- andrei
+	# mv -f $(CURDIR)/debian/ser/usr/etc $(CURDIR)/debian/ser
+	# make group packages
+	$(call PACKAGE_GRP_INSTALL_template)
+	# make single module packages
+	$(call PACKAGE_MODULE_INSTALL_template)
+	# install /etc/default/ser file
+	mkdir -p $(CURDIR)/debian/ser/etc/default
+	cp -f debian/ser.default $(CURDIR)/debian/ser/etc/default/ser
+	# install the *.sql files for ser_mysql.sh script
+	cp -f scripts/mysql/*.sql $(CURDIR)/debian/ser-mysql-module/usr/lib/ser/
+	# and fix path to the *.sql files in ser_mysql.sh script
+	sed -i 's#DEFAULT_SCRIPT_DIR=.*#DEFAULT_SCRIPT_DIR="/usr/lib/ser/"#' \
+		$(CURDIR)/debian/ser-mysql-module/usr/sbin/ser_mysql.sh
+	# install advanced ser config file for ser-oob package
+	mkdir -p $(CURDIR)/debian/ser-oob/etc/ser
+	cp -f etc/sip-router-oob.cfg $(CURDIR)/debian/ser-oob/etc/ser/ser-oob.cfg
+	#dh_movefiles
+
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common: 
+	dh_testdir
+	dh_testroot
+	dh_installdebconf	
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+	dh_installinit  -- defaults 23
+	dh_installcron
+	dh_installman
+	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs 
+	dh_link
+	dh_strip
+	dh_compress 
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-independent packages using the common target
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+# We have nothing to do by default.
+
+
+# Build architecture-dependent packages using the common target
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
diff --git a/pkg/ser/deb/debian/ser-oob.config b/pkg/ser/deb/debian/ser-oob.config
new file mode 100644
index 0000000..fdd3732
--- /dev/null
+++ b/pkg/ser/deb/debian/ser-oob.config
@@ -0,0 +1,81 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+# set cfg file name in default/ser file
+db_input medium ser-oob/CFG_FILE || true
+db_go
+
+# configure the ser-oob.cfg file ?
+db_input medium ser-oob/config || true
+db_go
+
+db_get ser-oob/config
+
+if [ "$RET" = "false" ]; then
+  exit 0
+fi
+
+db_input medium ser-oob/SERVERID || true
+db_go
+
+db_input medium ser-oob/LISTEN || true
+db_go
+
+# ask for administrative address and for replication sending addr only if listen addr was set
+db_get ser-oob/LISTEN
+if [ "$RET" != "" ]; then
+  db_input medium ser-oob/ADMINADDR || true
+  db_go
+  db_input medium ser-oob/SENDADDR || true
+  db_go
+else
+  # set admin addr to empty
+  db_set ser-oob/ADMINADDR
+fi
+
+db_input medium ser-oob/DBURL || true
+db_go
+
+db_input medium ser-oob/DBURLACC || true
+db_go
+
+db_input medium ser-oob/AUTHSECRET || true
+db_go
+
+db_input medium ser-oob/RTTPPROXY || true
+db_go
+
+db_input medium ser-oob/RTP_ENABLE || true
+db_go
+
+db_input medium ser-oob/NATPING_INTERVAL || true
+db_go
+
+db_input medium ser-oob/DBMODE || true
+db_go
+
+db_input medium ser-oob/CREATE_DB || true
+db_go
+
+db_get ser-oob/CREATE_DB
+if [ "$RET" = "true" ]; then
+  db_input medium ser-oob/MYSQLPASS || true
+  db_go
+fi
+
+db_input medium ser-oob/SERCTL_DOMAIN || true
+db_go
+
+db_get ser-oob/SERCTL_DOMAIN
+if [ "$RET" != "" ]; then
+  db_input medium ser-oob/SERCTL_USER || true
+  db_go
+
+  db_get ser-oob/SERCTL_USER
+  if [ "$RET" != "" ]; then
+    db_input medium ser-oob/SERCTL_PASS || true
+    db_go
+  fi
+fi
+
diff --git a/pkg/ser/deb/debian/ser-oob.postinst b/pkg/ser/deb/debian/ser-oob.postinst
new file mode 100644
index 0000000..d86a107
--- /dev/null
+++ b/pkg/ser/deb/debian/ser-oob.postinst
@@ -0,0 +1,286 @@
+#!/bin/sh
+
+set -e
+
+# don't do anything when called with other argument than configure 
+case "$1" in
+  configure)
+  ;;  
+  abort-upgrade|abort-remove|abort-deconfigure)
+    exit 0
+  ;;
+  *)
+    echo "postinst called with unknown argument \$1'" >&2
+    exit 1
+  ;;
+esac
+
+. /usr/share/debconf/confmodule
+
+
+# ser config file that will be altered by this script, based on debconf values
+CONFIGFILE=/etc/ser/ser-oob.cfg 
+# ser defaults file, where config filename is set
+DEFAULTFILE=/etc/default/ser
+
+
+if ! test -e $CONFIGFILE; then
+  echo "Warning: ser-oob postinst script can't find config file $CONFIGFILE. Configuration aborted."
+  exit 0
+fi
+
+if ! test -e $DEFAULTFILE; then
+  echo "Warning: ser-oob postinst script can't find config file $DEFAULTFILE. Configuration aborted."
+  exit 0
+fi
+
+
+fn_config_replace ()
+{
+	if test $# -ne 2; then
+	  echo "Error - bad number of input parameters"
+	  echo "usage:"
+	  echo "fn_config_replace config_file CFG_OPTION_something" 
+	  exit 1
+	fi
+
+	FILENAME="$1"
+	ITEM="$2"
+
+	echo "Changing config option $ITEM."
+	OLDFILE="$FILENAME.config_replace_bck"
+	cp -f $FILENAME $OLDFILE
+
+	REPLACEMENT="$FILENAME.repl"
+	TEMPFILE="$FILENAME.temp"
+	TAIL="$FILENAME.tail"
+
+	rm -f $REPLACEMENT
+	touch $REPLACEMENT # needed if the input is empty
+	while read -r LINE
+	do
+	  echo "$LINE" >> $REPLACEMENT
+	done
+
+	STARTPOS=`nl -b a $FILENAME | grep -w "DEBCONF-$ITEM-START" | sed -e "s/^ *\([0-9]*\).*/\1/g"`
+	if [ "$STARTPOS" == "" ]; then
+		echo "WARNING: section $ITEM not found"
+		return
+	fi
+		
+	ENDPOS=`nl -b a $FILENAME | sed -e "1,${STARTPOS}d" | grep "DEBCONF-$ITEM-END" | head -n 1 | sed -e "s/^ *\([0-9]*\).*/\1/g"`
+	if [ "$STARTPOS" == "" ]; then
+		echo "WARNING: end of section $ITEM not found"
+		return
+	fi
+	ENDPOS=$(($ENDPOS-1))
+	STARTPOS=$(($STARTPOS+1))
+
+	cat $FILENAME | sed -e "1,${ENDPOS}d" > $TAIL
+	cat $FILENAME | sed -e "${STARTPOS},\$d" > $TEMPFILE
+	cat $REPLACEMENT >> $TEMPFILE
+	cat $TAIL >> $TEMPFILE
+	rm -f $TAIL
+	mv -f $TEMPFILE $FILENAME
+}
+
+# pads $1 with as many empty rows as needed until $2 lines are complete
+padLines() {
+	output="$1"
+	needed="$2"
+	num=`echo "$output" | wc -l`
+	echo "$output"
+	moreneeded=$(($needed-$num))
+	while (true); do
+	if [ $moreneeded -gt 0 ]
+	then
+		echo ""
+		moreneeded=$(($moreneeded-1))
+	else
+		break
+	fi
+	done
+}
+
+#----------------------------------------------------------------------------
+
+db_get ser-oob/CFG_FILE
+if test "$RET" != "!" ; then
+  echo "Package ser-oob postinstall script: MODIFYING config file $DEFAULTFILE."
+  fn_config_replace $DEFAULTFILE CFG_FILE <<+++
+SER_CFG_FILE="$RET"
++++
+fi
+
+db_get ser-oob/config
+if [ "$RET" = "false" ] ; then
+  # do not change config file
+  echo "Package ser-oob postinstall script: NOT modifying config file $CONFIGFILE."
+else
+
+BACKUP="$CONFIGFILE.config_bck"
+
+echo "Package ser-oob postinstall script: MODIFYING config file $CONFIGFILE."
+echo "Creating backup copy as $BACKUP"
+cp -f $CONFIGFILE $BACKUP
+
+db_get ser-oob/SERVERID
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE SERVERID <<+++
+server_id=$RET
++++
+fi
+
+db_get ser-oob/LISTEN
+if test "$RET" != "!" ; then
+  if test "$RET" != "" ; then
+    echo "$RET"|sed 's/,/\n/g'|awk '{print "listen=\"" $1 "\""}' | \
+    fn_config_replace $CONFIGFILE LISTEN
+    # enable the replication block
+    echo "#" | fn_config_replace $CONFIGFILE REPLICATION1
+    echo "#" | fn_config_replace $CONFIGFILE REPLICATION2
+    # enable replication listen addr
+    echo "listen=224.0.1.75" | fn_config_replace $CONFIGFILE LISTEN_REPL
+  else
+    echo "#listen=127.0.0.1" | fn_config_replace $CONFIGFILE LISTEN
+    # comment out the replication block
+    echo "/*" | fn_config_replace $CONFIGFILE REPLICATION1
+    echo "*/" | fn_config_replace $CONFIGFILE REPLICATION2
+    # disable replication listen addr
+    echo "#listen=224.0.1.75" | fn_config_replace $CONFIGFILE LISTEN_REPL
+  fi
+fi
+
+db_get ser-oob/ADMINADDR
+if test "$RET" != "!" ; then
+  if test "$RET" != "" ; then
+    echo "listen=udp:$RET" | fn_config_replace $CONFIGFILE LISTEN_ADMIN
+  else
+    echo "#listen=udp:127.0.0.1" | fn_config_replace $CONFIGFILE LISTEN_ADMIN
+  fi
+fi
+
+db_get ser-oob/SENDADDR
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE REPL_SEND_ADDR <<+++
+		force_send_socket(udp:$RET);
++++
+fi
+
+db_get ser-oob/DBURL
+DBURL="$RET"
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE DBURL <<+++
+modparam("speeddial|auth_db|usrloc|acc_db|domain|uri_db|gflags|avp_db|db_ops", "db_url", "$RET")
++++
+fi
+
+db_get ser-oob/DBURLACC
+if test "$RET" = "" ; then
+  RET="$DBURL"
+fi    
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE DBURLACC <<+++
+modparam("acc_db", "db_url", "$RET")
++++
+fi
+
+db_get ser-oob/AUTHSECRET
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE AUTHSECRET <<+++
+modparam("auth", "secret", "$RET")
++++
+fi
+
+db_get ser-oob/RTTPPROXY
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE RTTPPROXY <<+++
+modparam("nathelper", "rtpproxy_sock", "$RET")
++++
+fi
+
+db_get ser-oob/RTP_ENABLE
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE RTP_ENABLE <<+++
+rtp_proxy.enabled = "$RET" desc "indicates whether the RTP Proxy is enabled or not (0/1/detect)"
++++
+fi
+
+db_get ser-oob/NATPING_INTERVAL
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE NATPING_INTERVAL <<+++
+modparam("nathelper", "natping_interval", $RET)
++++
+fi
+
+db_get ser-oob/DBMODE
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE DBMODE <<+++
+modparam("usrloc", "db_mode", $RET)
++++
+fi
+
+db_get ser-oob/CREATE_DB
+if [ "$RET" = "true" ] ; then
+  db_set ser-oob/CREATE_DB false
+  db_get ser-oob/MYSQLPASS
+  PASS="$RET"
+  db_set ser-oob/MYSQLPASS ""
+  echo "Creating ser database"
+  /usr/sbin/ser_mysql.sh create -q$PASS
+fi
+
+# restart ser - after creating db, but before calling ser_ctl
+if [ -x "/etc/init.d/ser" ]; then
+  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+    invoke-rc.d ser restart || echo "Warning: ser restart failed!"
+  else
+    /etc/init.d/ser restart || echo "Warning: ser restart failed!"
+  fi
+fi
+
+db_get ser-oob/SERCTL_DOMAIN
+if [ "$RET" != "" ] ; then
+  DOMAIN="$RET"
+  # clear it, to be sure we do not add it more than once
+  db_set ser-oob/SERCTL_DOMAIN
+  # add the domain using ser_ctl
+  echo "Waiting for ser to finish startup..."
+  # wait some time, to allow ser start after starting it
+  sleep 10
+  echo "Calling ser_ctl to add domain"
+  ser_ctl domain add $DOMAIN || echo "Warning: ser_ctl failed!"
+
+  db_get ser-oob/SERCTL_USER
+  if [ "$RET" != "" ] ; then
+    USER="$RET"
+    # clear it, to be sure we do not add it more than once
+    db_set ser-oob/SERCTL_USER
+    # get the user password
+    db_get ser-oob/SERCTL_PASS
+    PASS="$RET"
+    # clear it
+    db_set ser-oob/SERCTL_PASS
+    # add the user using ser_ctl
+    echo "Calling ser_ctl to add user"
+    ser_ctl user add $USER@$DOMAIN -p "$PASS" || echo "Waring: ser_ctl failed!"
+    echo "Calling ser_ctl to set user rights"
+    ser_ctl attrs set $USER@$DOMAIN sw_is_admin=1 sw_is_hostmaster=1 || echo "Waring: ser_ctl failed!"
+  fi
+fi
+
+
+fi # if changing config
+
+echo ""
+echo "***"
+echo "Configuration of ser-oob has finished."
+echo ""
+echo "To restart it when configuration has changed use '/etc/init.d/ser restart'"
+echo ""
+echo "To change it's configuration use 'dpkg-reconfigure ser-oob'"
+echo "***"
+echo ""
+
+exit 0
+
diff --git a/pkg/ser/deb/debian/ser-oob.postrm b/pkg/ser/deb/debian/ser-oob.postrm
new file mode 100644
index 0000000..808300f
--- /dev/null
+++ b/pkg/ser/deb/debian/ser-oob.postrm
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+
+exit 0
diff --git a/pkg/ser/deb/debian/ser-oob.prerm b/pkg/ser/deb/debian/ser-oob.prerm
new file mode 100644
index 0000000..2626f71
--- /dev/null
+++ b/pkg/ser/deb/debian/ser-oob.prerm
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "upgrade"; then
+  exit 0
+fi
+
+#DEBHELPER#
+
+
+exit 0
+
+
diff --git a/pkg/ser/deb/debian/ser-oob.templates b/pkg/ser/deb/debian/ser-oob.templates
new file mode 100644
index 0000000..6dcf79a
--- /dev/null
+++ b/pkg/ser/deb/debian/ser-oob.templates
@@ -0,0 +1,191 @@
+Template: ser-oob/CFG_FILE
+Type: string
+Default: /etc/ser/ser-oob.cfg
+Description: SER config file name 
+ This option sets SER config file name in '/etc/default/ser' file, which is used by SER init
+ script to start SER.
+ .
+ It is recommended to use the default value '/etc/ser/ser-oob.cfg'.
+ .
+ If you do not want to modify this setting now you can modify it manually later,
+ or repeat this configuartion by running "dpkg-reconfigure ser-oob".
+ .
+ Note: this value you enter here will be automatically applied to '/etc/default/ser' file
+ each time the ser-oob package is upgraded (or installed without purging previous
+ installation).
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/config
+Type: boolean
+Default: false
+Description: Change config file now ?
+ You have now opportunity to modify basic configuration values in 'ser-oob.cfg'
+ config file for SER Sip Express Router, installed from 'ser-oob' package.
+ If you do not want to modify the config file now you can modify it manually later,
+ or repeat this configuartion by running "dpkg-reconfigure ser-oob".
+ .
+ Note: the values you enter here will be automatically applied to 'ser-oob.cfg' file
+ each time the ser-oob package is upgraded (or installed without purging previous
+ installation).
+
+Template: ser-oob/SERVERID
+Type: string
+Default: 1
+Description: Unique identifier of the SER server
+ This is the unique identifier of the SER server. You only have to change this option
+ if you are setting up a cluster of SER servers. In that case each SER server within
+ the cluster must have its own unique number. Leave this option untouched if you are
+ setting up a single SER server only. Use integer numbes only.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/LISTEN
+Type: string
+Default: 127.0.0.1
+Description: List of IP addresses to listen on
+ List of all IP addresses SER will listen for SIP messages on. 
+ Multiple entries may be entered separated by commas.
+ Enter empty string to not set explicit listening address.
+ The order is important - SER will use the first address as the default address when it
+ doesn't know what socket to choose.
+ Please do not list private administrative address here (separate question for it will follow).
+ .
+ Note: if you do not specify any listen ip address then SER will listen on all interfaces,
+ and also replication using multicast will be disabled in the ser config.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/ADMINADDR
+Type: string
+Default:
+Description: Administrative IP address
+ Set the IP address of administrative interface (usually a private one), on which
+ Ser will also listen.
+ .
+ You can enter empty string to not listen on any administrative address.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/SENDADDR
+Type: string
+Default: 127.0.0.1
+Description: IP address used for sending replication
+ Set source IP address that Ser will use for sending REGISTERs replication
+ to multicast address.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/DBURL
+Type: string
+Default: mysql://ser:heslo@127.0.0.1/ser
+Description: address of database
+ Set the address of your database server which includes all provisioning
+ data. Example is "mysql://ser:heslo@localhost/ser".
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/DBURLACC
+Type: string
+Default: mysql://ser:heslo@127.0.0.1/ser
+Description: address of database for accounting
+ Set the address of your database that will be used for acconting. Example is "mysql://ser:heslo@localhost/ser".
+ .
+ You can leave it blank to use the same db as for provisioning data.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/AUTHSECRET
+Type: string
+Default: SomeSecretVerySecret
+Description: Synchronization secret for twin servers:
+ Local value used to generate secure nonces. Set it to a long random
+ string such as "alsdkhgla5sd7fkloKwr". Make sure that in hot/standby
+ setup the same secret is used on both machines.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/RTTPPROXY
+Type: string
+Default: udp:127.0.0.1:22222
+Description: RTP proxy control socket
+ Set address of RTP proxy control socket. Example: "udp:localhost:22222".
+ Enter empty string to not set any RTP proxy address.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/RTP_ENABLE
+Type: select
+Choices: 0, 1, detect, !
+Default: detect
+Description: Enable or disable the rtp proxy
+ Select whether to enable or disable using of RTP proxy. Possible values are:
+ "0" -- always disable, "1" -- always enable regardless of whether UAC or UAS is behind NAT,
+ "detect" -- detect whether the UAC or the UAS is behind NAT, and enable the rtp proxy
+ when necessary.
+ .
+ Use "!" to not modify this option.
+
+Template: ser-oob/NATPING_INTERVAL
+Type: select
+Choices: 0, 15, !
+Default: 15
+Description: NAT ping interval
+ Set NAT ping interval.
+ .
+ Use "!" to not modify this option.
+
+Template: ser-oob/DBMODE
+Type: select
+Choices: 0, 1, 2, !
+Default: 1
+Description: usrloc database mode
+ Set usrloc module db_mode option. Choices are: 0 -- memory cached,
+ 1 -- write thru, 2 -- delayed write.
+ .
+ 1 is generally safer than 2 ... 2 can help to survive peaks in load
+ however it creates delayed peaks that can impair request-processing
+ latency later (it would have to be re-redesigned more lock-free to
+ avoid it).
+ .
+ Enter "!" to not modify this option.
+
+Template: ser-oob/CREATE_DB
+Type: boolean
+Default: false
+Description: Create ser database
+ Do you want to create ser database 'ser' with default users 'ser' and 'serro' on Mysql
+ server running on localhost ? You should use this option when doing first-time installation only.
+ .
+ Note: you can run the script creation script manually by calling 'ser_mysql.sh'.
+
+Template: ser-oob/MYSQLPASS
+Type: string
+Default:
+Description: Mysql root password
+ Please enter your Mysql root password. It will be used to create the ser database. You can leave it empty
+ to use empty password.
+
+Template: ser-oob/SERCTL_DOMAIN
+Type: string
+Default:
+Description: Domain
+ Please enter your sip domain name. A record for it will be added using 'ser_ctl domain add' command. Note: this requires database to be already working.
+ .
+ Leave this entry empty to not add any domain.
+
+Template: ser-oob/SERCTL_USER
+Type: string
+Default:
+Description: Admin user
+ Please enter username for admin user. It will be created using 'ser_ctl user add' command and it's rights will be set using 'ser_ctl attrs <user> sw_is_admin=1 sw_is_hostmaster=1' command.
+ Note: this requires database to be already working.
+ .
+ Leave this entry empty to not add the user record.
+
+Template: ser-oob/SERCTL_PASS
+Type: string
+Default:
+Description: Admin user password
+ Please enter password for admin user.
+
diff --git a/pkg/ser/deb/debian/ser.config b/pkg/ser/deb/debian/ser.config
new file mode 100644
index 0000000..7d4ee16
--- /dev/null
+++ b/pkg/ser/deb/debian/ser.config
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+# configure ?
+db_input medium ser/config || true
+db_go
+
+db_get ser/config
+
+if [ "$RET" = "false" ]; then
+  exit 0
+fi
+
+db_input medium ser/USER || true
+db_go
+
+db_input medium ser/GROUP || true
+db_go
+
+db_input medium ser/WORKDIR || true
+db_go
+
+db_input medium ser/KERNEL_CORE_PID || true
+db_go
+
+db_input medium ser/MEMORY || true
+db_go
+
diff --git a/pkg/ser/deb/debian/ser.default b/pkg/ser/deb/debian/ser.default
new file mode 100644
index 0000000..448a88c
--- /dev/null
+++ b/pkg/ser/deb/debian/ser.default
@@ -0,0 +1,44 @@
+# configuration for ser - Sip Expres Router
+#
+# this file is sourced by ser init script /etc/init.d/ser
+
+# Note: the #DEBCONF-xxx-START and DEBCONF-xxx-END lines are used for
+# debconf configuration, please don't remove or alter them.
+
+# ser configuration file
+#DEBCONF-CFG_FILE-START
+SER_CFG_FILE="/etc/ser/ser.cfg"
+#DEBCONF-CFG_FILE-END
+
+# user to run ser as
+#DEBCONF-USER-START
+SER_USER="root"
+#DEBCONF-USER-END
+
+# group to run ser as
+#DEBCONF-GROUP-START
+SER_GROUP="root"
+#DEBCONF-GROUP-END
+
+# ser pidfile
+SER_PIDFILE="/var/run/ser/ser.pid"
+
+# working dir (cores will be placed there in case of ser crash)
+#DEBCONF-WORKDIR-START
+#SER_WORKDIR="/var/cores"
+#DEBCONF-WORKDIR-END
+
+# set if you want kernel flag to use pid for core files
+#DEBCONF-KERNEL_CORE_PID-START
+#SER_KERNEL_CORE_PID="yes"
+#DEBCONF-KERNEL_CORE_PID-END
+
+# size of shared memory used by ser, in megabytes
+#DEBCONF-MEMORY-START
+#SER_MEMORY="128"
+#DEBCONF-MEMORY-END
+
+
+
+
+
diff --git a/pkg/ser/deb/debian/ser.examples b/pkg/ser/deb/debian/ser.examples
new file mode 100644
index 0000000..efa9c4c
--- /dev/null
+++ b/pkg/ser/deb/debian/ser.examples
@@ -0,0 +1,15 @@
+examples/acc.cfg
+examples/ccdiversion.cfg
+examples/ctd.sh
+examples/exec.cfg
+examples/logging.cfg
+examples/msilo.cfg
+examples/onr.cfg
+examples/pstn.cfg
+examples/redirect.cfg
+examples/replicate.cfg
+examples/serial_183.cfg
+examples/uas.cfg
+examples/vm_proxy.cfg
+examples/voicemail.cfg
+examples/welcome.cfg
diff --git a/pkg/ser/deb/debian/ser.init b/pkg/ser/deb/debian/ser.init
new file mode 100644
index 0000000..b18aaef
--- /dev/null
+++ b/pkg/ser/deb/debian/ser.init
@@ -0,0 +1,125 @@
+#! /bin/sh
+#
+# skeleton	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
+#		Modified for Debian GNU/Linux
+#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels at cistron.nl
+#
+#  adapted for ser by Andrei Pelinescu-Onciul <pelinescu-onciul at fokus.gmd.de>
+# $Id$
+
+# read configuration from /etc/default/ser file
+if test -f /etc/default/ser ; then
+  . /etc/default/ser
+fi
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/ser
+NAME=ser
+DESC=ser
+
+PARAMS=""
+
+if test "$SER_PIDFILE" ; then
+  PARAMS="$PARAMS -P $SER_PIDFILE"
+fi
+
+if test "$SER_USER" ; then
+  PARAMS="$PARAMS -u $SER_USER"
+fi
+
+if test "$SER_GROUP" ; then
+  PARAMS="$PARAMS -g $SER_GROUP"
+fi
+
+if test "$SER_CFG_FILE" ; then
+  PARAMS="$PARAMS -f $SER_CFG_FILE"
+  CFGPARAMS="-f $SER_CFG_FILE"
+fi
+
+if test "$SER_WORKDIR" ; then
+  PARAMS="$PARAMS -w $SER_WORKDIR"
+  # try to create the working dir
+  mkdir -p $SER_WORKDIR || echo "Warning: error creating ser working dir $SER_WORKDIR"
+fi
+
+if test "$SER_MEMORY" ; then
+  PARAMS="$PARAMS -m $SER_MEMORY"
+fi
+
+if test "$SER_KERNEL_CORE_PID" = "true" ; then
+  # enable using pid for cores
+  echo 1 > /proc/sys/kernel/core_uses_pid || echo "Warning: error when enabling /proc/sys/kernel/core_uses_pid"
+fi
+
+if ! test -f $DAEMON ; then
+  echo "Error: cannot find $DAEMON"
+  exit 0
+fi
+
+LD_LIBRARY_PATH=/usr/lib/ser
+export LD_LIBRARY_PATH
+
+set -e
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: $NAME"
+	start-stop-daemon --start --quiet --pidfile $SER_PIDFILE \
+		--exec $DAEMON -- $PARAMS
+	echo "."
+	;;
+  stop)
+	echo -n "Stopping $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile $SER_PIDFILE \
+		--exec $DAEMON
+	echo "."
+	;;
+  #reload)
+	#
+	#	If the daemon can reload its config files on the fly
+	#	for example by sending it SIGHUP, do it here.
+	#
+	#	If the daemon responds to changes in its config file
+	#	directly anyway, make this a do-nothing entry.
+	#
+	# echo "Reloading $DESC configuration files."
+	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
+	#	$SER_PIDFILE --exec $DAEMON
+  #;;
+  restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	# Check if ser configuration is valid before restarting the server
+        (($DAEMON $CFGPARAMS -c 2>&1) | grep "config file ok, exiting") > /dev/null
+	if [ $? -ne 0 ]; then
+            ($DAEMON $CFGPARAMS -c 2>&1)
+	    echo -e "\nThere are errors in the configuration file. Please fix them first"
+	    echo -e "\n$out\n"
+	    exit 0
+	fi
+	echo -n "Restarting $DESC: $NAME"
+	start-stop-daemon --oknodo --stop --quiet --pidfile \
+		$SER_PIDFILE --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$SER_PIDFILE --exec $DAEMON  -- $PARAMS
+	echo "."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
+
diff --git a/pkg/ser/deb/debian/ser.templates b/pkg/ser/deb/debian/ser.templates
new file mode 100644
index 0000000..9b91b96
--- /dev/null
+++ b/pkg/ser/deb/debian/ser.templates
@@ -0,0 +1,59 @@
+Template: ser/config
+Type: boolean
+Default: false
+Description: Change config file now ?
+ You have now opportunity to modify basic configuration values in '/etc/default/ser'
+ config file for SER Sip Express Router, installed from 'ser' package. Settings from this
+ file are used by SER init script when it is started - e.g. size of shared memory used,
+ user and group to run as, working directory.
+ .
+ If you do not want to modify the config file now you can modify it manually later,
+ or repeat this configuartion by running "dpkg-reconfigure ser".
+ .
+ Note: if you choose 'yes' here then the values you enter will be automatically applied
+ each time the ser package is upgraded (or installed without purging previous installation).
+
+Template: ser/USER
+Type: string
+Default: root
+Description: User to run SER as
+ Set the user which SER should run as. Default is 'root' user.
+ .
+ Note: if you want ser to be able to dump a core file in case of crash, you have to run it as root user.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser/GROUP
+Type: string
+Default: root
+Description: Group to run SER as
+ Set the group which SER should run as. Default is 'root' group.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser/WORKDIR
+Type: string
+Default: /
+Description: SER working directory
+ Set the working directory to which core files will be written in case of SER crash.
+ For debugging purposes it is recommended to use '/var/cores' directory. The directory will
+ be created automatically by SER init script if not existing.
+ .
+ Enter "!" to not modify this option.
+
+Template: ser/KERNEL_CORE_PID
+Type: boolean
+Default: false
+Description: Set kernel to use pid for core files
+ If enabled the '/proc/sys/kernel/core_uses_pid' will be set to '1' before starting SER,
+ to enable using of pid for core files creation. If disabled nothing will be set.
+ For debugging purposes it is recommended to enable this option.
+
+Template: ser/MEMORY
+Type: string
+Default: 32
+Description: Size of shared memory used, in MB
+ Set size of SER shared memory to allocate, in megabytes.
+ .
+ Enter "!" to not modify this option.
+
diff --git a/pkg/ser/deb/debian/shlibs.local b/pkg/ser/deb/debian/shlibs.local
new file mode 100644
index 0000000..e69de29
diff --git a/pkg/ser/deb/debian/watch b/pkg/ser/deb/debian/watch
new file mode 100644
index 0000000..f318abc
--- /dev/null
+++ b/pkg/ser/deb/debian/watch
@@ -0,0 +1,7 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+version=2
+
+# Site		Directory		Pattern			Version	Script
+ftp://ftp.berlios.de/pub/ser/latest/src/ser-(.*)_src\.tar\.gz	debian	uupdate
diff --git a/pkg/ser/freebsd/000.ser.sh b/pkg/ser/freebsd/000.ser.sh
new file mode 100644
index 0000000..814c074
--- /dev/null
+++ b/pkg/ser/freebsd/000.ser.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# Start/stop/restart SIP EXpress Router (SER)
+#
+# Version: 1.0 - Paul Belanger <pabelanger at gmail.com>
+#
+# Directions:
+# copy ser script to /usr/local/etc/rc.d/
+# edit /etc/rc.conf and add the following:
+# ser_enable="YES"
+#
+#
+# 05.05.2005 - Initial Version
+
+. /etc/rc.subr
+
+name="ser"
+rcvar="`set_rcvar`"
+command="/usr/local/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+ser_flags="$cron_flags -P $pidfile"
+run_rc_command "$1"
diff --git a/pkg/ser/freebsd/Makefile b/pkg/ser/freebsd/Makefile
new file mode 100644
index 0000000..f8cdc54
--- /dev/null
+++ b/pkg/ser/freebsd/Makefile
@@ -0,0 +1,55 @@
+# New ports collection makefile for:    ser
+# Date created:        6 November 2002
+# Whom:                andrei
+#
+# $FreeBSD$
+#
+# $Id$
+#
+
+
+PORTNAME= ser
+PORTVERSION= 0.9.4
+CATEGORIES= net
+MASTER_SITES= ftp://ftp.iptel.org/pub/ser/0.9.4/src/
+
+MAINTAINER= andrei at iptel.org
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 501000
+# FreeBSD 5.1 wants COMMENT and it doesn't like pkg-comment
+COMMENT= Sip Express Router, very fast and configurable SIP proxy
+COMMENTFILE= 
+.endif
+
+MAN8=ser.8
+MAN5=ser.cfg.5
+MANCOMPRESSED= no
+
+
+USE_GMAKE= yes
+# we override the DISTFILE NAME
+DISTNAME= ${PORTNAME}-${PORTVERSION}_src
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+# build by default mysql and jabber
+MAKE_ENV= include_modules="mysql jabber cpl-c pa"
+
+
+
+
+# depends on mysql and libexpat because of the above modules
+BUILD_DEPENDS= ${LOCALBASE}/include/expat.h:${PORTSDIR}/textproc/expat* \
+               ${LOCALBASE}/include/mysql/mysql.h:${PORTSDIR}/databases/mysql*-client \
+               ${LOCALBASE}/include/libxml2/libxml/uri.h:${PORTSDIR}/textproc/libxml2* 
+LIB_DEPENDS=   expat:${PORTSDIR}/textproc/expat* \
+               mysqlclient:${PORTSDIR}/databases/mysql*-client \
+               xml2:${PORTSDIR}/textproc/libxml2
+
+pre-fetch:
+
+
+.include <bsd.port.post.mk>
+
+
diff --git a/pkg/ser/freebsd/distinfo b/pkg/ser/freebsd/distinfo
new file mode 100644
index 0000000..995bc51
--- /dev/null
+++ b/pkg/ser/freebsd/distinfo
@@ -0,0 +1 @@
+MD5 (ser-0.9.4_src.tar.gz) = d12d56d76c86b59dd51a43b3251b7d3a
diff --git a/pkg/ser/freebsd/pkg-comment b/pkg/ser/freebsd/pkg-comment
new file mode 100644
index 0000000..6cef836
--- /dev/null
+++ b/pkg/ser/freebsd/pkg-comment
@@ -0,0 +1 @@
+Sip Express Router, very fast and configurable SIP proxy
diff --git a/pkg/ser/freebsd/pkg-descr b/pkg/ser/freebsd/pkg-descr
new file mode 100644
index 0000000..af5e7bf
--- /dev/null
+++ b/pkg/ser/freebsd/pkg-descr
@@ -0,0 +1,15 @@
+ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: Digest Authentication,
+CPL scripts, Instant Messaging, MySQL support, Presence Agent, Radius
+Authentication, Record Routing, SMS Gateway, Jabber Gateway, Transaction
+Module, Registrar, User Location, NAT Traversal, a.s.o.
+
+
+WWW: http://www.iptel.org/ser/
+
+- Andrei Pelinescu-Onciul
+andrei at iptel.org
diff --git a/pkg/ser/freebsd/pkg-plist b/pkg/ser/freebsd/pkg-plist
new file mode 100644
index 0000000..c6825ed
--- /dev/null
+++ b/pkg/ser/freebsd/pkg-plist
@@ -0,0 +1,104 @@
+etc/ser/dictionary.ser
+etc/ser/ser.cfg
+lib/ser/modules/acc_db.so
+lib/ser/modules/acc_syslog.so
+lib/ser/modules/auth.so
+lib/ser/modules/auth_db.so
+lib/ser/modules/avp.so
+lib/ser/modules/avp_db.so
+lib/ser/modules/avpops.so
+lib/ser/modules/cpl-c.so
+lib/ser/modules/ctl.so
+lib/ser/modules/db_ops.so
+lib/ser/modules/dbtext.so
+lib/ser/modules/dialog.so
+lib/ser/modules/dispatcher.so
+lib/ser/modules/domain.so
+lib/ser/modules/enum.so
+lib/ser/modules/eval.so
+lib/ser/modules/exec.so
+lib/ser/modules/flatstore.so
+lib/ser/modules/gflags.so
+lib/ser/modules/jabber.so
+lib/ser/modules/lcr.so
+lib/ser/modules/maxfwd.so
+lib/ser/modules/mediaproxy.so
+lib/ser/modules/msilo.so
+lib/ser/modules/mysql.so
+lib/ser/modules/nathelper.so
+lib/ser/modules/options.so
+lib/ser/modules/pa.so
+lib/ser/modules/pdt.so
+lib/ser/modules/permissions.so
+lib/ser/modules/pike.so
+lib/ser/modules/print.so
+lib/ser/modules/ratelimit.so
+lib/ser/modules/registrar.so
+lib/ser/modules/rr.so
+lib/ser/modules/sl.so
+lib/ser/modules/sms.so
+lib/ser/modules/speeddial.so
+lib/ser/modules/textops.so
+lib/ser/modules/timer.so
+lib/ser/modules/tm.so
+lib/ser/modules/uac.so
+lib/ser/modules/uri.so
+lib/ser/modules/uri_db.so
+lib/ser/modules/usrloc.so
+lib/ser/modules/xlog.so
+lib/ser/modules/xmlrpc.so
+sbin/ser
+sbin/ser_mysql.sh
+sbin/serunix
+share/doc/ser/AUTHORS
+share/doc/ser/INSTALL
+share/doc/ser/NEWS
+share/doc/ser/README
+share/doc/ser/README-MODULES
+share/doc/ser/README.acc_db
+share/doc/ser/README.acc_syslog
+share/doc/ser/README.auth
+share/doc/ser/README.auth_db
+share/doc/ser/README.avp
+share/doc/ser/README.avp_db
+share/doc/ser/README.avpops
+share/doc/ser/README.cpl-c
+share/doc/ser/README.ctl
+share/doc/ser/README.db_ops
+share/doc/ser/README.dbtext
+share/doc/ser/README.dialog
+share/doc/ser/README.dispatcher
+share/doc/ser/README.domain
+share/doc/ser/README.enum
+share/doc/ser/README.eval
+share/doc/ser/README.exec
+share/doc/ser/README.flatstore
+share/doc/ser/README.gflags
+share/doc/ser/README.jabber
+share/doc/ser/README.lcr
+share/doc/ser/README.maxfwd
+share/doc/ser/README.msilo
+share/doc/ser/README.nathelper
+share/doc/ser/README.options
+share/doc/ser/README.pa
+share/doc/ser/README.pdt
+share/doc/ser/README.permissions
+share/doc/ser/README.pike
+share/doc/ser/README.print
+share/doc/ser/README.registrar
+share/doc/ser/README.rr
+share/doc/ser/README.sl
+share/doc/ser/README.sms
+share/doc/ser/README.speeddial
+share/doc/ser/README.textops
+share/doc/ser/README.tm
+share/doc/ser/README.uac
+share/doc/ser/README.uri
+share/doc/ser/README.uri_db
+share/doc/ser/README.usrloc
+share/doc/ser/README.xlog
+share/doc/ser/README.xmlrpc
+ at dirrm share/doc/ser
+ at dirrm etc/ser
+ at dirrm lib/ser/modules
+ at dirrm lib/ser
diff --git a/pkg/ser/gentoo/ChangeLog b/pkg/ser/gentoo/ChangeLog
new file mode 100644
index 0000000..dd14747
--- /dev/null
+++ b/pkg/ser/gentoo/ChangeLog
@@ -0,0 +1,78 @@
+# ChangeLog for net-misc/sip-router
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*sip-router-3.3.2 (17 Oct 2012)
+
+  17 Oct 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.3.2.ebuild:
+  Version bump (series 3.3.x).
+
+*sip-router-3.3.1 (5 Oct 2012)
+
+  5 Oct 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.3.1.ebuild:
+  Version bump (series 3.3.x).
+
+*sip-router-3.2.4 (4 Oct 2012)
+
+  4 Oct 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.2.4.ebuild:
+  Version bump (series 3.2.x).
+
+*sip-router-3.1.6 (3 Oct 2012)
+
+  3 Oct 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.1.6.ebuild:
+  Version bump (series 3.1.x).
+
+
+*sip-router-3.2.3 (26 Apr 2012)
+
+  26 Apr 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.2.3.ebuild:
+  Version bump.
+
+*sip-router-3.2.2 (15 Feb 2012)
+
+  15 Feb 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.2.2.ebuild:
+  Version bump.
+
+*sip-router-3.2.1 (25 Jan 2012)
+
+  25 Jan 2012; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.2.1.ebuild:
+  Version bump.
+
+*sip-router-3.1.5 (21 Sep 2011)
+
+  21 Sep 2011; Claudio G. Furrer <elcaio at gmail.com> +sip-router.3.1.5.ebuild:
+  Version bump.
+
+  21 Sep 2011; Claudio G. Furrer <elcaio at gmail.com> -sip-router-3.1.2.ebuild,
+  -sip-router-3.1.3.ebuild, -sip-router-3.1.4.ebuild, -sip-router-3.1.4-r1.ebuild,
+  -files/siprouter.confd, -files/siprouter.init:
+  Older versions than 3.1.4-r2 are no longer packaged.
+
+*sip-router-3.1.4 (13 Sep 2011)
+  
+  13 Sep 2011; Claudio G. Furrer <elcaio at gmail.com> +sip-router-3.1.4-r2.ebuild,
+  +files/ser.confd, +files/ser.initd:
+  Fix installation paths and names based on flavour specified in the USE flag
+  (ser or kamailio).
+
+  24 Aug 2011; Claudio G. Furrer <elcaio at gmail.com> sip-router-3.1.4-r1.ebuild:
+  Added kamailio-specific groups (group_k*) in USE flags.
+
+  31 May 2011; Claudio G. Furrer <elcaio at gmail.com> sip-router-3.1.4.ebuild:
+  Version bump.
+
+*sip-router-3.1.3 (03 May 2011)
+  
+  03 May 2011; Claudio G. Furrer <elcaio at gmail.com> sip-router-3.1.3.ebuild:
+  Version bump.
+
+*sip-router-3.1.2 (21 Mar 2011)
+  
+  23 Mar 2011; Claudio G. Furrer <elcaio at gmail.com> sip-router-3.1.2.ebuild,
+  +metadata.xml:
+  Added flavours USE setup for kamailio/ser/sip-router options.
+  Also was added metadata file.
+
+  22 Mar 2011; Claudio G. Furrer <elcaio at gmail.com> sip-router-3.1.2.ebuild:
+  Added initial ChangeLog which should be updated whenever the package is
+  updated in any way.
diff --git a/pkg/ser/gentoo/Manifest b/pkg/ser/gentoo/Manifest
new file mode 100644
index 0000000..2d24582
--- /dev/null
+++ b/pkg/ser/gentoo/Manifest
@@ -0,0 +1,16 @@
+AUX ser.confd 514 SHA256 fec2d2b5c1f222bfd413ece424c2ee6b7fdff2fc71f8b95abb6b31118f209770 SHA512 3745b3bdc1ae2dd2d4cf7c4dbdcb5dc8a2667dcbb50bcff89ea01ac3f95ff213b93ae0402c45703305781fd9c6f4968f59f1a9c509670f54f4cf58a788d53c55 WHIRLPOOL 645a88d3442a34d755eed69a7586c96f219ea3fb096ba6a86aaf13314d306c59d9dd5a656787612b1c0a7e784f148d712641f3c2869383a542e11c9525cd881b
+AUX ser.initd 800 SHA256 c9b748c5756e1bf2ee72ff0350b5f9ad1b8489d41008a00d66e335b276252a44 SHA512 57f558a42cfeee7eb78583ba68d64874e3d162c67ec064034061cf37e47d42e2924f0a37ecc47c25d7df1cab9281ac0d0f06ccb3b1bdebde8894f4450b3a8696 WHIRLPOOL cb6a2ff4d7ae5c88d87f1341ab38c787454b7074c9780cf93ebf52a06623720413ae636f40027beff18d828669194b47c5395ac368036db5bf8b543f6fdef54f
+DIST kamailio-3.1.5_src.tar.gz 7025269 SHA256 5d1a2db3f9bea3cfac76777646627be24e6033876a5bf60200882be00cefe9ca SHA512 5090e656ea3af12ea9dbbb09d2b1fbfaca4b7089f695d3652a64802d1e763678c2b2a03796eebb1a5d47530a786a4b88e9e5ee5bf80c260f4bd75033be3008cf WHIRLPOOL 68538eb109a4c5f8ab75e58a06453d80a2c80fcb777b42042369a8ed730a59634aaec1cb84a8c9c1e17dbc2a940851a698beb63f9afa2420748d6694a61c5686
+DIST kamailio-3.1.6_src.tar.gz 7002535 SHA256 eb69af9d5bf851c802618ffe9f901200a750366fe9a68e0fc7e5ed233997f4b5 SHA512 66347f73e8b48cb746e950c57b726a3e7640ae7ec78575307fb250103cab5660c93b1e186bdd89589a62f0d3ea329ea659afdf21723fd0bb9d89a041231850ff WHIRLPOOL fe309ab3c317b534e920605f749654f37670cb86f19417461f56692a26b54a54857a8c62c2332e25c9a308924974227e2a815bbbcaf84498bd866a9888d48fc9
+DIST kamailio-3.2.3_src.tar.gz 7227846 SHA256 673253bb3ec2f0cccba0fcddc8c93b3a41da4a1f63b5220736ee348d5ca3d131 SHA512 59dae999b0a598156032ba86e29cabf2053de1e7cb6dcb4a3b0ad76e4f0acc18980c804185a8edb545a360247676be13cbab77f2465875bb9591ca3885e85368 WHIRLPOOL b7978bba572724d709744a6c4e61aef740c611e011ef20469b51f9a419e88776329e4936ac664b1bce2c2b4b0b861c17ac927935637d0795c124597a1f163b2c
+DIST kamailio-3.2.4_src.tar.gz 7253378 SHA256 f367de0957807479f6c3f1df6ad3033819504c99f6007b90bc73ff0535657ab7 SHA512 9fe97296ac4321f8c9c052011b66ba298951499b4c27d16cb3b3e8aa6b9619e7ef91679c5ce22f4b0639bb06ceedc859efd2df3199338fb5da73005f11926eac WHIRLPOOL bf020eaab1b1e339165e51628ec37de8cbf9defde92248a37b519689516ee200287638a2ec489a180c05633bd9d7ddd933793f50ca97f360ad3a8310599d1493
+DIST kamailio-3.3.1_src.tar.gz 7468878 SHA256 45c153776efad809ec1f88710d7d3cd57c9f805050611378eaccf99bed63a122 SHA512 aa14c17fe113502266819f7824b377d8856aa48380ed4e66f2540d86a646cd19052b5e6da7f28f4b92fcbdd57b4182969536702f6f8f27119295a5c944242883 WHIRLPOOL c01fb645893284e7941f82dd61b3f79761600ac217dc8326614b16580c7d28d5a263c7235379901846948ec80dca695e69a6f617b2df5e1e0802d111432700bd
+DIST kamailio-3.3.2_src.tar.gz 7483530 SHA256 dae3ca1c6372ae5a01a7b8e9d49e297c1cee01032b77524d00e6d5082fbeef61 SHA512 4b1ed2d6b6028a3cc3c18ee7f5e54143c15a7d6a4fc6cf7710f3d70415355bfe2e893c7384b94acc0f67c09abf670b87ea15afce0917b085d0419a05b6e771b9 WHIRLPOOL df4a6497c221af621a0f72a84fecad0dc0c09eb485bb40444f35518406cab340fd6eceef6c558283e30c39901f44b0e22ba595503b3f2354dd329bb6adc3edc1
+EBUILD sip-router-3.1.5.ebuild 8024 SHA256 1adb67682eaa5a9dfee306473023bf7403068199a0e8916db521e230452b1e78 SHA512 8e8bf4b491e9dd5c17230fdd338138188f16a584e9a4e22baea4ac22a767ff8e40860618a630afd959f57fcf0948d7081827ddbcc1a6b62d691518d4716e6a2f WHIRLPOOL 820bbfcb11137d0a9414a9f9ebbb5be6930b269d1341c1b323ea682a55d1514312b918f7150b33034722c4d239f2f4b66a8edf41bec587f382ad24a140278088
+EBUILD sip-router-3.1.6.ebuild 8106 SHA256 a2959cdeef926236cdbadf06b4c2340ffca7cde1338499a14ca511c60ab3556a SHA512 ac238b7dd0a669a16caa047c99d74c0d0425759340b59785b1a3e593ae9e245d1e8dcf71b052070d8681c5b0db03abf2e7250b7f20fb09837d727809272f2515 WHIRLPOOL d3d332d549b9e73a6e685bbbe8e093372d794fd506e0826103450cc8a59bfa4c7f939d3893dab09ed845541c74ff64d8d04c3aad24ffea9b6964457806e7d387
+EBUILD sip-router-3.2.3.ebuild 8115 SHA256 fa4b3c79a93ee13bfa8ed47952c549e848b452689d78fac8d8596b4e2966864f SHA512 e257ecf83f44f446098ec6fc7b0565e5ca6b7eb7dbeddc34baacb5592825065ef93a05ca24c3f85b6c817e4c23e407861e7c1bc79d883f4882f7153a88bbc928 WHIRLPOOL 0a44d52e6fbae7e79f2f69b115734174af30cd6b662205e81b84b92b92158e7fb94416fa4d35b5b3c0f6048f6ca7b269c46c860602a276c872b5605cd1b018f0
+EBUILD sip-router-3.2.4.ebuild 8155 SHA256 4efbbf1cea7d46f065947869723db90dc43453b6451b6830dcf5f5363a3ff5b8 SHA512 2c20dfdee22e54f8a429e4aedcc7c0771c2e03b53a7632a11fdc47335d81ed33fc89070d22775c7cba68f7874fec97ac8441338b44f62be30654092ac0f239af WHIRLPOOL 53a960bc2d8bbd3a1a0a4fc3eee5ded932fd2576b57f12e1030a58913aeab2b61e089a23849c5b65afb41abd299cb7aa9496db343a6f472fc5438de27ef7f67c
+EBUILD sip-router-3.3.1.ebuild 8327 SHA256 12ab91b617bda58321dfa4d256628f533e299bd78632f7617a1ee7d35800f416 SHA512 d1aba8330182465234f7d64969a64fd412fb1866c22b51ae02b7866aa1936eb2fbe462aa8f43379e1ae19b38e973d9e8663f1faf0412566ca776b6e214423442 WHIRLPOOL f8fb38968d94576f8191dbafdda2c0709511b7f98ae24b3855e53990c55abacb98cbca3bd6c1440656cc41ee5d81e9b57c0765fbaa2ca413d9ce98438ec7207b
+EBUILD sip-router-3.3.2.ebuild 8327 SHA256 12ab91b617bda58321dfa4d256628f533e299bd78632f7617a1ee7d35800f416 SHA512 d1aba8330182465234f7d64969a64fd412fb1866c22b51ae02b7866aa1936eb2fbe462aa8f43379e1ae19b38e973d9e8663f1faf0412566ca776b6e214423442 WHIRLPOOL f8fb38968d94576f8191dbafdda2c0709511b7f98ae24b3855e53990c55abacb98cbca3bd6c1440656cc41ee5d81e9b57c0765fbaa2ca413d9ce98438ec7207b
+MISC ChangeLog 2480 SHA256 a8bdaddc1f1f468f25499b534236fae5980466ba0333a3aaad7fd8b406f37f9d SHA512 2fc633bfbf0363822764121de7f1dda66c2264ee122ff0843b7647b84b25ad45a04fd0ce3797d84883b35defbf525b17bd67d6b4afd33cdbcff4e22dcda5d7c5 WHIRLPOOL bec2be2ad6cecadadde47f8767d4640ceaae06fc6698fb12b27c174c27c5305199cf2de7c9b277ae53adc629043a5a3dce87e3617e103000b4991e1f2914f400
+MISC metadata.xml 234 SHA256 4009ad9d312db0ece6fd53e9dfabda98e2c1037ec540eb64d6ab43fe318c1a25 SHA512 cca7444682a294c6173682dc78d73ee82ff19a6a8bc052d6850dab0a49056c0bcca347b83cd592360540399f21016fc360ea29a2234dd8fa1d6e13f6feedee16 WHIRLPOOL a37bbdac2e9489e68e1e0871eb8847dd04df20c4aae756173e7c6a13622ee60c87508f6f26e24b1dbe9c5cb929f57cb86c65042945d8129d3ba1ef8d7338b314
diff --git a/pkg/ser/gentoo/files/ser.confd b/pkg/ser/gentoo/files/ser.confd
new file mode 100644
index 0000000..4b1f248
--- /dev/null
+++ b/pkg/ser/gentoo/files/ser.confd
@@ -0,0 +1,16 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Additional options to start Sip-Router with.
+#
+# see "sip-router -h" for a list of options
+#
+# default: run SER as user:group = ser:ser
+#
+MAIN_NAME="sip-router"
+SR_USER="sip-router"
+SR_GROUP="sip-router"
+CONFIGFILE="${CONFIGFILE:-/etc/${MAIN_NAME}/sip-router.cfg}"
+CONFIGDEFS="" # eg: "-A WITH_DEBUG -A WITH_NAT -A WITH_TLS"
+SR_OPTS="-u $SR_USER -g $SR_GROUP -f ${CONFIGFILE} ${CONFIGDEFS}"
diff --git a/pkg/ser/gentoo/files/ser.initd b/pkg/ser/gentoo/files/ser.initd
new file mode 100644
index 0000000..99d0fbe
--- /dev/null
+++ b/pkg/ser/gentoo/files/ser.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+	need net
+}
+
+check_config() {
+	out=`(/usr/sbin/sip-router -f ${CONFIGFILE} -c > /dev/null || true) 2>&1`
+	echo "$out" | grep -q 'config file ok, exiting...'
+	if [ "$?" == 1 ]; then
+		echo -e "There are errors in the configuration. Please fix them first"
+		echo -e "\n$out\n"
+		return 1
+	fi
+}
+
+start() {
+	check_config || return 1
+	ebegin "Starting sip-router"
+	start-stop-daemon --start --quiet --pidfile /var/run/sip-router.pid \
+		--exec /usr/sbin/sip-router -- -P /var/run/sip-router.pid \
+                ${SR_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping sip-router"
+	start-stop-daemon --stop --quiet --pidfile /var/run/sip-router.pid
+	eend $?
+}
+
diff --git a/pkg/ser/gentoo/metadata.xml b/pkg/ser/gentoo/metadata.xml
new file mode 100644
index 0000000..d48077a
--- /dev/null
+++ b/pkg/ser/gentoo/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>voip</herd>
+	<maintainer>
+		<email>maintainer-needed at gentoo.org</email>
+	</maintainer>
+</pkgmetadata>
+
diff --git a/pkg/ser/gentoo/sip-router-3.1.5.ebuild b/pkg/ser/gentoo/sip-router-3.1.5.ebuild
new file mode 100644
index 0000000..cd0f9a8
--- /dev/null
+++ b/pkg/ser/gentoo/sip-router-3.1.5.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
+HOMEPAGE="http://sip-router.org/"
+MY_P="${P/sip-router/kamailio}"
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.1.x/
+IUSE="flavour_kamailio flavour_ser debug ipv6 sctp
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence group_kxml group_kperl group_kldap
+acc acc_radius alias_db app_lua app_python auth auth_identity auth_db auth_diameter auth_radius avpops
+benchmark blst
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting
+enum exec
+geoip group
+h350 htable imc iptrtpproxy jabber kex
+lcr ldap
+matrix maxfwd mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
+nathelper nat_traversal
+osp
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
+presence presence_conference presence_dialoginfo presence_mwi presence_xml
+pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp purple pv
+qos
+ratelimit regex registrar rls rtimer rr rtpproxy
+sanity seas siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
+textops textopsx tls tm tmx topoh
+uac uac_redirect uri_db userblacklist usrloc utils
+xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp"
+
+#osp? ( net-libs/osptoolkit )
+#pdb? ( pdb-server )
+#seas? ( www.wesip.eu )
+
+RDEPEND="
+	>=sys-libs/ncurses-5.7
+	>=sys-libs/readline-6.1_p2
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
+	group_postgres? ( dev-db/postgresql-base )
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
+	group_kpostgres? ( dev-db/postgresql-base )
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
+	group_kldap? ( net-nds/openldap )
+	acc_radius? ( net-dialup/radiusclient-ng )
+	app_lua? ( dev-lang/lua )
+	app_python? ( dev-lang/python )
+	auth_identity? ( dev-libs/openssl net-misc/curl )
+	carrierroute? ( dev-libs/confuse )
+	cpl-c? ( dev-libs/libxml2 )
+	db_berkeley? ( >=sys-libs/db-4.6 )
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
+	db_oracle? ( dev-db/oracle-instantclient-basic )
+	db_postgres? ( dev-db/postgresql-base )
+        db_unixodbc? ( dev-db/unixODBC )
+	dialplan? ( dev-libs/libpcre )
+	geoip? ( dev-libs/geoip )
+	h350? ( net-nds/openldap )
+	jabber? ( dev-libs/expat )
+	lcr? ( dev-libs/libpcre )
+	ldap? ( net-nds/openldap )
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	peering? ( net-dialup/radiusclient-ng )
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
+	presence? ( dev-libs/libxml2 )
+	presence_conference? ( dev-libs/libxml2 )
+	presence_xml? ( dev-libs/libxml2 )
+	pua? ( dev-libs/libxml2 )
+	pua_bla? ( dev-libs/libxml2 )
+	pua_dialoginfo? ( dev-libs/libxml2 )
+	pua_usrloc? ( dev-libs/libxml2 )
+	pua_xmpp? ( dev-libs/libxml2 )
+	purple? ( net-im/pidgin )
+	regex? ( dev-libs/libpcre )
+	rls? ( dev-libs/libxml2 )
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
+	tls? (
+		sys-libs/zlib
+		>=dev-libs/openssl-1.0.0a-r1
+	)
+	utils? ( net-misc/curl )
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
+	xcap_server? ( dev-libs/libxml2 )
+	xmlops? ( dev-libs/libxml2 )
+	xmpp? ( dev-libs/expat )
+"
+DEPEND="${RDEPEND}
+	>=sys-devel/bison-1.35
+	>=sys-devel/flex-2.5.4a
+	app-text/docbook2X"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+
+	use ipv6 || \
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+}
+
+src_compile() {
+	# iptrtpproxy broken as the needed netfilter module is not supported
+	local mod_exc="iptrtpproxy"
+	local group_inc=""
+	local k=""
+	if use flavour_kamailio; then
+		k="k"
+		use group_kxml && group_inc="${group_inc} kxml"
+		use group_kperl && group_inc="${group_inc} kperl"
+		use group_kldap && group_inc="${group_inc} kldap"
+	fi
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
+	use group_stable && group_inc="${group_inc} stable"
+	use group_experimental && group_inc="${group_inc} experimental"
+	# TODO: skip_modules?
+
+	local mod_inc=""
+	# some IUSE flags must not be included here in mod_inc
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
+	for i in ${IUSE[@]}; do
+		for j in ${i[@]}; do
+			[[ ! "${i}" =~ "flavour_" ]] && \
+				[ ! "${i}" == "debug" ] && \
+				[ ! "${i}" == "ipv6" ] && \
+				[ ! "${i}" == "sctp" ] && \
+				[[ ! "${i}" =~ "group_" ]] && \
+			use "${i}" && mod_inc="${mod_inc} ${i}"
+		done
+	done
+
+	if use tls; then
+		tls_hooks=1
+	else
+		tls_hooks=0
+	fi
+
+	if use debug; then
+		mode=debug
+	else
+		mode=release
+	fi
+
+	if use flavour_kamailio; then
+		flavour=kamailio
+	else
+		flavour=ser # defaults to SER compatibility names
+	fi
+
+	if use sctp; then
+		sctp=1
+	else
+		sctp=0
+	fi
+
+	emake \
+		CC="$(tc-getCC)" \
+		CPU_TYPE="$(get-flag march)" \
+		SCTP="${sctp}" \
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
+		mode="${mode}" \
+		TLS_HOOKS="${tls_hooks}" \
+		FLAVOUR="${flavour}" \
+		group_include="${group_inc}" \
+		include_modules="${mod_inc}" \
+		exclude_modules="${mod_exc}" \
+		prefix="/" \
+		all || die "emake all failed"
+}
+
+src_install() {
+	emake -j1 \
+		BASEDIR="${D}" \
+		FLAVOUR="${flavour}" \
+		prefix="/" \
+		bin_dir=/usr/sbin/ \
+		cfg_dir=/etc/${flavour}/ \
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
+		man_dir="/usr/share/man/" \
+		doc_dir="/usr/share/doc/${flavour}/" \
+		install || die "emake install failed"
+
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
+
+	newinitd "${flavour}".initd "${flavour}"
+	newconfd "${flavour}".confd "${flavour}"
+}
+
+pkg_preinst() {
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
+		einfo "Adding ${flavour} user and group"
+		enewgroup "${flavour}"
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
+	fi
+
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
+
+	has_version <="${CATEGORY}/ser-0.9.8"
+	previous_installed_version=$?
+	if [[ $previous_installed_version = 1 ]] ; then
+		elog "You have a previous version of SER on ${ROOT}etc/ser"
+		elog "Consider or verify to remove it (emerge -C ser)."
+		elog
+		elog "Sip-Router may not could be installed/merged. See your elog."
+	fi
+}
+
+pkg_postinst() {
+	if [ use mediaproxy ]; then
+		einfo "You have enabled mediaproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+	if [ use rtpproxy ]; then
+		einfo "You have enabled rtpproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+}
+
+pkg_prerm () {
+	/etc/init.d/"${flavour}" stop >/dev/null
+}
diff --git a/pkg/ser/gentoo/sip-router-3.1.6.ebuild b/pkg/ser/gentoo/sip-router-3.1.6.ebuild
new file mode 100644
index 0000000..8635ecc
--- /dev/null
+++ b/pkg/ser/gentoo/sip-router-3.1.6.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
+HOMEPAGE="http://sip-router.org/"
+MY_P="${P/sip-router/kamailio}"
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.1.x/
+IUSE="flavour_kamailio flavour_ser debug ipv6 sctp
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence group_kxml group_kperl group_kldap
+acc acc_radius alias_db app_lua app_python auth auth_identity auth_db auth_diameter auth_radius avpops
+benchmark blst
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting
+enum exec
+geoip group
+h350 htable imc iptrtpproxy jabber kex
+lcr ldap
+matrix maxfwd mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
+nathelper nat_traversal
+osp
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
+presence presence_conference presence_dialoginfo presence_mwi presence_xml
+pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp purple pv
+qos
+ratelimit regex registrar rls rtimer rr rtpproxy
+sanity seas siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
+textops textopsx tls tm tmx topoh
+uac uac_redirect uri_db userblacklist usrloc utils
+xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp"
+
+#osp? ( net-libs/osptoolkit )
+#pdb? ( pdb-server )
+#seas? ( www.wesip.eu )
+
+RDEPEND="
+	>=sys-libs/ncurses-5.7
+	>=sys-libs/readline-6.1_p2
+	group_experimental? ( dev-libs/openssl dev-db/oracle-instantclient-basic )
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
+	group_postgres? ( dev-db/postgresql-base )
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
+	group_kpostgres? ( dev-db/postgresql-base )
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
+	group_kldap? ( net-nds/openldap )
+	acc_radius? ( net-dialup/radiusclient-ng )
+	app_lua? ( >=dev-lang/lua-5.1 )
+	app_python? ( dev-lang/python )
+	auth_identity? ( dev-libs/openssl net-misc/curl )
+	carrierroute? ( dev-libs/confuse )
+	cpl-c? ( dev-libs/libxml2 )
+	db_berkeley? ( >=sys-libs/db-4.6 )
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
+	db_oracle? ( dev-db/oracle-instantclient-basic )
+	db_postgres? ( dev-db/postgresql-base )
+        db_unixodbc? ( dev-db/unixODBC )
+	dialplan? ( dev-libs/libpcre )
+	geoip? ( dev-libs/geoip )
+	h350? ( net-nds/openldap )
+	jabber? ( dev-libs/expat )
+	lcr? ( dev-libs/libpcre )
+	ldap? ( net-nds/openldap )
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	peering? ( net-dialup/radiusclient-ng )
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
+	presence? ( dev-libs/libxml2 )
+	presence_conference? ( dev-libs/libxml2 )
+	presence_xml? ( dev-libs/libxml2 )
+	pua? ( dev-libs/libxml2 )
+	pua_bla? ( dev-libs/libxml2 )
+	pua_dialoginfo? ( dev-libs/libxml2 )
+	pua_usrloc? ( dev-libs/libxml2 )
+	pua_xmpp? ( dev-libs/libxml2 )
+	purple? ( net-im/pidgin )
+	regex? ( dev-libs/libpcre )
+	rls? ( dev-libs/libxml2 )
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
+	tls? (
+		sys-libs/zlib
+		>=dev-libs/openssl-1.0.0a-r1
+	)
+	utils? ( net-misc/curl )
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
+	xcap_server? ( dev-libs/libxml2 )
+	xmlops? ( dev-libs/libxml2 )
+	xmpp? ( dev-libs/expat )
+"
+DEPEND="${RDEPEND}
+	>=sys-devel/bison-1.35
+	>=sys-devel/flex-2.5.4a
+	app-text/docbook2X"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+
+	use ipv6 || \
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+}
+
+src_compile() {
+	# iptrtpproxy broken as the needed netfilter module is not supported
+	local mod_exc="iptrtpproxy"
+	local group_inc=""
+	local k=""
+	if use flavour_kamailio; then
+		k="k"
+		use group_kxml && group_inc="${group_inc} kxml"
+		use group_kperl && group_inc="${group_inc} kperl"
+		use group_kldap && group_inc="${group_inc} kldap"
+	fi
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
+	use group_stable && group_inc="${group_inc} stable"
+	use group_experimental && group_inc="${group_inc} experimental"
+	# TODO: skip_modules?
+
+	local mod_inc=""
+	# some IUSE flags must not be included here in mod_inc
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
+	for i in ${IUSE[@]}; do
+		for j in ${i[@]}; do
+			[[ ! "${i}" =~ "flavour_" ]] && \
+				[ ! "${i}" == "debug" ] && \
+				[ ! "${i}" == "ipv6" ] && \
+				[ ! "${i}" == "sctp" ] && \
+				[[ ! "${i}" =~ "group_" ]] && \
+			use "${i}" && mod_inc="${mod_inc} ${i}"
+		done
+	done
+
+	if use tls; then
+		tls_hooks=1
+	else
+		tls_hooks=0
+	fi
+
+	if use debug; then
+		mode=debug
+	else
+		mode=release
+	fi
+
+	if use flavour_kamailio; then
+		flavour=kamailio
+	else
+		flavour=ser # defaults to SER compatibility names
+	fi
+
+	if use sctp; then
+		sctp=1
+	else
+		sctp=0
+	fi
+
+	emake \
+		CC="$(tc-getCC)" \
+		CPU_TYPE="$(get-flag march)" \
+		SCTP="${sctp}" \
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
+		mode="${mode}" \
+		TLS_HOOKS="${tls_hooks}" \
+		FLAVOUR="${flavour}" \
+		group_include="${group_inc}" \
+		include_modules="${mod_inc}" \
+		exclude_modules="${mod_exc}" \
+		prefix="/" \
+		all || die "emake all failed"
+}
+
+src_install() {
+	emake -j1 \
+		BASEDIR="${D}" \
+		FLAVOUR="${flavour}" \
+		prefix="/" \
+		bin_dir=/usr/sbin/ \
+		cfg_dir=/etc/${flavour}/ \
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
+		man_dir="/usr/share/man/" \
+		doc_dir="/usr/share/doc/${flavour}/" \
+		install || die "emake install failed"
+
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
+
+	newinitd "${flavour}".initd "${flavour}"
+	newconfd "${flavour}".confd "${flavour}"
+}
+
+pkg_preinst() {
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
+		einfo "Adding ${flavour} user and group"
+		enewgroup "${flavour}"
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
+	fi
+
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
+
+	has_version <="${CATEGORY}/ser-0.9.8"
+	previous_installed_version=$?
+	if [[ $previous_installed_version = 1 ]] ; then
+		elog "You have a previous version of SER on ${ROOT}etc/ser"
+		elog "Consider or verify to remove it (emerge -C ser)."
+		elog
+		elog "Sip-Router may not could be installed/merged. See your elog."
+	fi
+}
+
+pkg_postinst() {
+	if [ use mediaproxy ]; then
+		einfo "You have enabled mediaproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+	if [ use rtpproxy ]; then
+		einfo "You have enabled rtpproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+}
+
+pkg_prerm () {
+	/etc/init.d/"${flavour}" stop >/dev/null
+}
diff --git a/pkg/ser/gentoo/sip-router-3.2.3.ebuild b/pkg/ser/gentoo/sip-router-3.2.3.ebuild
new file mode 100644
index 0000000..6b00f62
--- /dev/null
+++ b/pkg/ser/gentoo/sip-router-3.2.3.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
+HOMEPAGE="http://sip-router.org/"
+MY_P="${P/sip-router/kamailio}"
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.2.x/
+IUSE="flavour_kamailio flavour_ser debug ipv6 sctp
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence
+group_kxml group_kperl group_kldap group_kjson
+acc acc_radius alias_db app_lua app_python async auth auth_identity auth_db auth_diameter auth_radius avpops
+benchmark blst
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
+db_sqlite ndb_redis
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting dmq
+enum exec geoip group
+h350 htable imc ipops iptrtpproxy jabber json jsonrpc-c kex
+lcr ldap
+matrix maxfwd mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
+nathelper nat_traversal
+osp
+p_usrloc
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
+presence presence_conference presence_dialoginfo presence_mwi presence_reginfo presence_xml
+pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp purple pv
+qos
+ratelimit regex registrar rls rtimer rr rtpproxy
+sanity sdpops seas sipcapture siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
+textops textopsx tls tm tmx topoh
+uac uac_redirect uri_db userblacklist usrloc utils
+xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp"
+
+#pdb? ( pdb-server )
+#seas? ( www.wesip.eu )
+
+RDEPEND="
+	>=sys-libs/ncurses-5.7
+	>=sys-libs/readline-6.1_p2
+	group_experimental? ( dev-libs/openssl dev-db/redis )
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
+	group_postgres? ( dev-db/postgresql-base )
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
+	group_kpostgres? ( dev-db/postgresql-base )
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
+	group_kldap? ( net-nds/openldap )
+	group_kjson? ( dev-libs/json-c dev-libs/libevent )
+	acc_radius? ( net-dialup/radiusclient-ng )
+	app_lua? ( dev-lang/lua )
+	app_python? ( dev-lang/python )
+	auth_identity? ( dev-libs/openssl net-misc/curl )
+	carrierroute? ( dev-libs/confuse )
+	cpl-c? ( dev-libs/libxml2 )
+	db_berkeley? ( >=sys-libs/db-4.6 )
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
+	db_oracle? ( dev-db/oracle-instantclient-basic )
+	db_postgres? ( dev-db/postgresql-base )
+	db_sqlite? ( >=dev-db/sqlite-3 )
+	db_unixodbc? ( dev-db/unixODBC )
+	ndb_redis? ( dev-db/redis )
+	dialplan? ( dev-libs/libpcre )
+	geoip? ( dev-libs/geoip )
+	h350? ( net-nds/openldap )
+	jabber? ( dev-libs/expat )
+	lcr? ( dev-libs/libpcre )
+	ldap? ( net-nds/openldap )
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	osp? ( net-libs/osptoolkit )
+	peering? ( net-dialup/radiusclient-ng )
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
+	presence? ( dev-libs/libxml2 )
+	presence_conference? ( dev-libs/libxml2 )
+	presence_xml? ( dev-libs/libxml2 )
+	pua? ( dev-libs/libxml2 )
+	pua_bla? ( dev-libs/libxml2 )
+	pua_dialoginfo? ( dev-libs/libxml2 )
+	pua_usrloc? ( dev-libs/libxml2 )
+	pua_xmpp? ( dev-libs/libxml2 )
+	purple? ( net-im/pidgin )
+	regex? ( dev-libs/libpcre )
+	rls? ( dev-libs/libxml2 )
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
+	tls? (
+		sys-libs/zlib
+		>=dev-libs/openssl-1.0.0a-r1
+	)
+	utils? ( net-misc/curl )
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
+	xcap_server? ( dev-libs/libxml2 )
+	xmlops? ( dev-libs/libxml2 )
+	xmpp? ( dev-libs/expat )
+"
+DEPEND="${RDEPEND}
+	>=sys-devel/bison-1.35
+	>=sys-devel/flex-2.5.4a
+	app-text/docbook2X"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+
+	use ipv6 || \
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+}
+
+src_compile() {
+	# iptrtpproxy broken as the needed netfilter module is not supported
+	local mod_exc="iptrtpproxy"
+	local group_inc=""
+	local k=""
+	if use flavour_kamailio; then
+		k="k"
+		use group_kxml && group_inc="${group_inc} kxml"
+		use group_kperl && group_inc="${group_inc} kperl"
+		use group_kldap && group_inc="${group_inc} kldap"
+		use group_kjson && group_inc="${group_inc} kjson"
+	fi
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
+	use group_stable && group_inc="${group_inc} stable"
+	use group_experimental && group_inc="${group_inc} experimental"
+	# TODO: skip_modules?
+
+	local mod_inc=""
+	# some IUSE flags must not be included here in mod_inc
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
+	for i in ${IUSE[@]}; do
+		for j in ${i[@]}; do
+			[[ ! "${i}" =~ "flavour_" ]] && \
+				[ ! "${i}" == "debug" ] && \
+				[ ! "${i}" == "ipv6" ] && \
+				[ ! "${i}" == "sctp" ] && \
+				[[ ! "${i}" =~ "group_" ]] && \
+			use "${i}" && mod_inc="${mod_inc} ${i}"
+		done
+	done
+
+	if use tls; then
+		tls_hooks=1
+	else
+		tls_hooks=0
+	fi
+
+	if use debug; then
+		mode=debug
+	else
+		mode=release
+	fi
+
+	if use flavour_kamailio; then
+		flavour=kamailio
+	else
+		flavour=ser # defaults to SER compatibility names
+	fi
+
+	if use sctp; then
+		sctp=1
+	else
+		sctp=0
+	fi
+
+	emake \
+		CC="$(tc-getCC)" \
+		CPU_TYPE="$(get-flag march)" \
+		SCTP="${sctp}" \
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
+		mode="${mode}" \
+		TLS_HOOKS="${tls_hooks}" \
+		FLAVOUR="${flavour}" \
+		group_include="${group_inc}" \
+		include_modules="${mod_inc}" \
+		exclude_modules="${mod_exc}" \
+		prefix="/" \
+		all || die "emake all failed"
+}
+
+src_install() {
+	emake -j1 \
+		BASEDIR="${D}" \
+		FLAVOUR="${flavour}" \
+		prefix="/" \
+		bin_dir=/usr/sbin/ \
+		cfg_dir=/etc/${flavour}/ \
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
+		man_dir="/usr/share/man/" \
+		doc_dir="/usr/share/doc/${flavour}/" \
+		share_dir="/usr/share/${flavour}/" \
+		data_dir="/usr/share/${flavour}/" \
+		install || die "emake install failed"
+
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
+
+	newinitd "${flavour}".initd "${flavour}"
+	newconfd "${flavour}".confd "${flavour}"
+}
+
+pkg_preinst() {
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
+		einfo "Adding ${flavour} user and group"
+		enewgroup "${flavour}"
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
+	fi
+
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
+
+}
+
+pkg_postinst() {
+	if [ use mediaproxy ]; then
+		einfo "You have enabled mediaproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+	if [ use rtpproxy ]; then
+		einfo "You have enabled rtpproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+}
+
+pkg_prerm () {
+	/etc/init.d/"${flavour}" stop >/dev/null
+}
diff --git a/pkg/ser/gentoo/sip-router-3.2.4.ebuild b/pkg/ser/gentoo/sip-router-3.2.4.ebuild
new file mode 100644
index 0000000..9eae9c6
--- /dev/null
+++ b/pkg/ser/gentoo/sip-router-3.2.4.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
+HOMEPAGE="http://sip-router.org/"
+MY_P="${P/sip-router/kamailio}"
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.2.x/
+IUSE="flavour_kamailio flavour_ser debug ipv6 sctp
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence
+group_kxml group_kperl group_kldap group_kjson
+acc acc_radius alias_db app_lua app_python async auth auth_identity auth_db auth_diameter auth_radius avpops
+benchmark blst
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
+db_sqlite ndb_redis
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting dmq
+enum exec geoip group
+h350 htable imc ipops iptrtpproxy jabber json jsonrpc-c kex
+lcr ldap
+matrix maxfwd mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
+nathelper nat_traversal
+osp
+p_usrloc
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
+presence presence_conference presence_dialoginfo presence_mwi presence_reginfo presence_xml
+pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp purple pv
+qos
+ratelimit regex registrar rls rtimer rr rtpproxy
+sanity sdpops seas sipcapture siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
+textops textopsx tls tm tmx topoh
+uac uac_redirect uri_db userblacklist usrloc utils
+xcap_client xcap_server xhttp xlog xmlops xmlrpc xmpp"
+
+#pdb? ( pdb-server )
+#seas? ( www.wesip.eu )
+
+RDEPEND="
+	>=sys-libs/ncurses-5.7
+	>=sys-libs/readline-6.1_p2
+	group_experimental? ( dev-libs/openssl dev-db/redis dev-db/oracle-instantclient-basic )
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
+	group_postgres? ( dev-db/postgresql-base )
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
+	group_kpostgres? ( dev-db/postgresql-base )
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
+	group_kldap? ( net-nds/openldap )
+	group_kjson? ( dev-libs/json-c dev-libs/libevent )
+	acc_radius? ( net-dialup/radiusclient-ng )
+	app_lua? ( >=dev-lang/lua-5.1 )
+	app_python? ( dev-lang/python )
+	auth_identity? ( dev-libs/openssl net-misc/curl )
+	carrierroute? ( dev-libs/confuse )
+	cpl-c? ( dev-libs/libxml2 )
+	db_berkeley? ( >=sys-libs/db-4.6 )
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
+	db_oracle? ( dev-db/oracle-instantclient-basic )
+	db_postgres? ( dev-db/postgresql-base )
+	db_sqlite? ( >=dev-db/sqlite-3 )
+	db_unixodbc? ( dev-db/unixODBC )
+	ndb_redis? ( dev-db/redis )
+	dialplan? ( dev-libs/libpcre )
+	geoip? ( dev-libs/geoip )
+	h350? ( net-nds/openldap )
+	jabber? ( dev-libs/expat )
+	lcr? ( dev-libs/libpcre )
+	ldap? ( net-nds/openldap )
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	osp? ( net-libs/osptoolkit )
+	peering? ( net-dialup/radiusclient-ng )
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
+	presence? ( dev-libs/libxml2 )
+	presence_conference? ( dev-libs/libxml2 )
+	presence_xml? ( dev-libs/libxml2 )
+	pua? ( dev-libs/libxml2 )
+	pua_bla? ( dev-libs/libxml2 )
+	pua_dialoginfo? ( dev-libs/libxml2 )
+	pua_usrloc? ( dev-libs/libxml2 )
+	pua_xmpp? ( dev-libs/libxml2 )
+	purple? ( net-im/pidgin )
+	regex? ( dev-libs/libpcre )
+	rls? ( dev-libs/libxml2 )
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
+	tls? (
+		sys-libs/zlib
+		>=dev-libs/openssl-1.0.0a-r1
+	)
+	utils? ( net-misc/curl )
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
+	xcap_server? ( dev-libs/libxml2 )
+	xmlops? ( dev-libs/libxml2 )
+	xmpp? ( dev-libs/expat )
+"
+DEPEND="${RDEPEND}
+	>=sys-devel/bison-1.35
+	>=sys-devel/flex-2.5.4a
+	app-text/docbook2X"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+
+	use ipv6 || \
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+}
+
+src_compile() {
+	# iptrtpproxy broken as the needed netfilter module is not supported
+	local mod_exc="iptrtpproxy"
+	local group_inc=""
+	local k=""
+	if use flavour_kamailio; then
+		k="k"
+		use group_kxml && group_inc="${group_inc} kxml"
+		use group_kperl && group_inc="${group_inc} kperl"
+		use group_kldap && group_inc="${group_inc} kldap"
+		use group_kjson && group_inc="${group_inc} kjson"
+	fi
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
+	use group_stable && group_inc="${group_inc} stable"
+	use group_experimental && group_inc="${group_inc} experimental"
+	# TODO: skip_modules?
+
+	local mod_inc=""
+	# some IUSE flags must not be included here in mod_inc
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
+	for i in ${IUSE[@]}; do
+		for j in ${i[@]}; do
+			[[ ! "${i}" =~ "flavour_" ]] && \
+				[ ! "${i}" == "debug" ] && \
+				[ ! "${i}" == "ipv6" ] && \
+				[ ! "${i}" == "sctp" ] && \
+				[[ ! "${i}" =~ "group_" ]] && \
+			use "${i}" && mod_inc="${mod_inc} ${i}"
+		done
+	done
+
+	if use tls; then
+		tls_hooks=1
+	else
+		tls_hooks=0
+	fi
+
+	if use debug; then
+		mode=debug
+	else
+		mode=release
+	fi
+
+	if use flavour_kamailio; then
+		flavour=kamailio
+	else
+		flavour=ser # defaults to SER compatibility names
+	fi
+
+	if use sctp; then
+		sctp=1
+	else
+		sctp=0
+	fi
+
+	emake \
+		CC="$(tc-getCC)" \
+		CPU_TYPE="$(get-flag march)" \
+		SCTP="${sctp}" \
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
+		mode="${mode}" \
+		TLS_HOOKS="${tls_hooks}" \
+		FLAVOUR="${flavour}" \
+		group_include="${group_inc}" \
+		include_modules="${mod_inc}" \
+		exclude_modules="${mod_exc}" \
+		prefix="/" \
+		all || die "emake all failed"
+}
+
+src_install() {
+	emake -j1 \
+		BASEDIR="${D}" \
+		FLAVOUR="${flavour}" \
+		prefix="/" \
+		bin_dir=/usr/sbin/ \
+		cfg_dir=/etc/${flavour}/ \
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
+		man_dir="/usr/share/man/" \
+		doc_dir="/usr/share/doc/${flavour}/" \
+		share_dir="/usr/share/${flavour}/" \
+		data_dir="/usr/share/${flavour}/" \
+		install || die "emake install failed"
+
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
+
+	newinitd "${flavour}".initd "${flavour}"
+	newconfd "${flavour}".confd "${flavour}"
+}
+
+pkg_preinst() {
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
+		einfo "Adding ${flavour} user and group"
+		enewgroup "${flavour}"
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
+	fi
+
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
+
+}
+
+pkg_postinst() {
+	if [ use mediaproxy ]; then
+		einfo "You have enabled mediaproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+	if [ use rtpproxy ]; then
+		einfo "You have enabled rtpproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+}
+
+pkg_prerm () {
+	/etc/init.d/"${flavour}" stop >/dev/null
+}
diff --git a/pkg/ser/gentoo/sip-router-3.3.1.ebuild b/pkg/ser/gentoo/sip-router-3.3.1.ebuild
new file mode 100644
index 0000000..dcd11cd
--- /dev/null
+++ b/pkg/ser/gentoo/sip-router-3.3.1.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
+HOMEPAGE="http://sip-router.org/"
+MY_P="${P/sip-router/kamailio}"
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.3.x/
+IUSE="flavour_kamailio flavour_ser
+debug ipv6 sctp
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence
+group_kxml group_kperl group_kldap group_kjson
+acc acc_radius alias_db app_lua app_python app_mono async auth auth_identity auth_db auth_diameter auth_radius avpops
+benchmark blst
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
+db_sqlite ndb_redis db_cassandra db_cluster
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting dmq
+enum exec geoip group
+h350 htable imc ipops iptrtpproxy jabber json jsonrpc-c kex
+lcr ldap
+matrix maxfwd msrp mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
+nathelper nat_traversal
+osp
+p_usrloc
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
+presence presence_conference presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml
+pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp purple pv
+qos
+ratelimit regex registrar rls rtimer rr rtpproxy
+sanity sdpops seas sipcapture siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
+textops textopsx tls tm tmx tmrec topoh
+uac uac_redirect uri_db userblacklist usrloc utils
+xcap_client xcap_server xhttp xhttp_rpc xlog xmlops xmlrpc xmpp"
+
+# FIXME: no ebuilds for them
+#db_cassandra? ( thrift dev-db/cassandra )
+#pdb? ( pdb-server )
+#seas? ( www.wesip.eu )
+
+RDEPEND="
+	>=sys-libs/ncurses-5.7
+	>=sys-libs/readline-6.1_p2
+	group_experimental? ( dev-libs/openssl dev-db/redis dev-db/oracle-instantclient-basic )
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
+	group_postgres? ( dev-db/postgresql-base )
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
+	group_kpostgres? ( dev-db/postgresql-base )
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
+	group_kldap? ( net-nds/openldap )
+	group_kjson? ( dev-libs/json-c dev-libs/libevent )
+	acc_radius? ( net-dialup/radiusclient-ng )
+	app_lua? ( >=dev-lang/lua-5.1 )
+	app_python? ( dev-lang/python )
+	app_mono? ( dev-lang/mono )
+	auth_identity? ( dev-libs/openssl net-misc/curl )
+	carrierroute? ( dev-libs/confuse )
+	cpl-c? ( dev-libs/libxml2 )
+	db_berkeley? ( >=sys-libs/db-4.6 )
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
+	db_oracle? ( dev-db/oracle-instantclient-basic )
+	db_postgres? ( dev-db/postgresql-base )
+	db_sqlite? ( >=dev-db/sqlite-3 )
+	db_unixodbc? ( dev-db/unixODBC )
+	ndb_redis? ( dev-db/redis )
+	dialplan? ( dev-libs/libpcre )
+	geoip? ( dev-libs/geoip )
+	h350? ( net-nds/openldap )
+	jabber? ( dev-libs/expat )
+	lcr? ( dev-libs/libpcre )
+	ldap? ( net-nds/openldap )
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	osp? ( net-libs/osptoolkit )
+	peering? ( net-dialup/radiusclient-ng )
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
+	presence? ( dev-libs/libxml2 )
+	presence_conference? ( dev-libs/libxml2 )
+	presence_xml? ( dev-libs/libxml2 )
+	pua? ( dev-libs/libxml2 )
+	pua_bla? ( dev-libs/libxml2 )
+	pua_dialoginfo? ( dev-libs/libxml2 )
+	pua_usrloc? ( dev-libs/libxml2 )
+	pua_xmpp? ( dev-libs/libxml2 )
+	purple? ( net-im/pidgin )
+	regex? ( dev-libs/libpcre )
+	rls? ( dev-libs/libxml2 )
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
+	tls? (
+		sys-libs/zlib
+		>=dev-libs/openssl-1.0.0a-r1
+	)
+	utils? ( net-misc/curl )
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
+	xcap_server? ( dev-libs/libxml2 )
+	xmlops? ( dev-libs/libxml2 )
+	xmpp? ( dev-libs/expat )
+"
+DEPEND="${RDEPEND}
+	>=sys-devel/bison-1.35
+	>=sys-devel/flex-2.5.4a
+	app-text/docbook2X"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+
+	use ipv6 || \
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+}
+
+src_compile() {
+	# iptrtpproxy broken as the needed netfilter module is not supported
+	local mod_exc="iptrtpproxy"
+	local group_inc=""
+	local k=""
+	if use flavour_kamailio; then
+		k="k"
+		use group_kxml && group_inc="${group_inc} kxml"
+		use group_kperl && group_inc="${group_inc} kperl"
+		use group_kldap && group_inc="${group_inc} kldap"
+		use group_kjson && group_inc="${group_inc} kjson"
+	fi
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
+	use group_stable && group_inc="${group_inc} stable"
+	use group_experimental && group_inc="${group_inc} experimental"
+	# TODO: skip_modules?
+
+	local mod_inc=""
+	# some IUSE flags must not be included here in mod_inc
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
+	for i in ${IUSE[@]}; do
+		for j in ${i[@]}; do
+			[[ ! "${i}" =~ "flavour_" ]] && \
+				[ ! "${i}" == "debug" ] && \
+				[ ! "${i}" == "ipv6" ] && \
+				[ ! "${i}" == "sctp" ] && \
+				[[ ! "${i}" =~ "group_" ]] && \
+			use "${i}" && mod_inc="${mod_inc} ${i}"
+		done
+	done
+
+	if use tls; then
+		tls_hooks=1
+	else
+		tls_hooks=0
+	fi
+
+	if use debug; then
+		mode=debug
+	else
+		mode=release
+	fi
+
+	if use flavour_kamailio; then
+		flavour=kamailio
+	else
+		flavour=ser # defaults to SER compatibility names
+	fi
+
+	if use sctp; then
+		sctp=1
+	else
+		sctp=0
+	fi
+
+	emake \
+		CC="$(tc-getCC)" \
+		CPU_TYPE="$(get-flag march)" \
+		SCTP="${sctp}" \
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
+		mode="${mode}" \
+		TLS_HOOKS="${tls_hooks}" \
+		FLAVOUR="${flavour}" \
+		group_include="${group_inc}" \
+		include_modules="${mod_inc}" \
+		exclude_modules="${mod_exc}" \
+		prefix="/" \
+		all || die "emake all failed"
+}
+
+src_install() {
+	emake -j1 \
+		BASEDIR="${D}" \
+		FLAVOUR="${flavour}" \
+		prefix="/" \
+		bin_dir=/usr/sbin/ \
+		cfg_dir=/etc/${flavour}/ \
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
+		man_dir="/usr/share/man/" \
+		doc_dir="/usr/share/doc/${flavour}/" \
+		share_dir="/usr/share/${flavour}/" \
+		data_dir="/usr/share/${flavour}/" \
+		install || die "emake install failed"
+
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
+
+	newinitd "${flavour}".initd "${flavour}"
+	newconfd "${flavour}".confd "${flavour}"
+}
+
+pkg_preinst() {
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
+		einfo "Adding ${flavour} user and group"
+		enewgroup "${flavour}"
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
+	fi
+
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
+
+}
+
+pkg_postinst() {
+	if [ use mediaproxy ]; then
+		einfo "You have enabled mediaproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+	if [ use rtpproxy ]; then
+		einfo "You have enabled rtpproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+}
+
+pkg_prerm () {
+	/etc/init.d/"${flavour}" stop >/dev/null
+}
diff --git a/pkg/ser/gentoo/sip-router-3.3.2.ebuild b/pkg/ser/gentoo/sip-router-3.3.2.ebuild
new file mode 100644
index 0000000..dcd11cd
--- /dev/null
+++ b/pkg/ser/gentoo/sip-router-3.3.2.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Sip-Router (Kamailio/SER) is an Open Source SIP Server"
+HOMEPAGE="http://sip-router.org/"
+MY_P="${P/sip-router/kamailio}"
+SRC_URI="http://www.kamailio.org/pub/kamailio/${PV}/src/${MY_P}_src.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+#Documentation can be found here: http://www.kamailio.org/docs/modules/3.3.x/
+IUSE="flavour_kamailio flavour_ser
+debug ipv6 sctp
+group_standard group_standard_dep group_mysql group_radius group_postgres group_presence group_stable group_experimental
+group_kstandard group_kmysql group_kradius group_kpostgres group_kpresence
+group_kxml group_kperl group_kldap group_kjson
+acc acc_radius alias_db app_lua app_python app_mono async auth auth_identity auth_db auth_diameter auth_radius avpops
+benchmark blst
+call_control carrierroute cfg_db cfg_rpc cfgutils counters cpl-c ctl
+db_berkeley db_flatstore db_mysql db_oracle db_postgres db_text db_unixodbc
+db_sqlite ndb_redis db_cassandra db_cluster
+debugger dialog dialplan dispatcher diversion domain domainpolicy drouting dmq
+enum exec geoip group
+h350 htable imc ipops iptrtpproxy jabber json jsonrpc-c kex
+lcr ldap
+matrix maxfwd msrp mediaproxy memcached misc_radius mi_datagram mi_fifo mi_rpc mi_xmlrpc mqueue msilo mtree
+nathelper nat_traversal
+osp
+p_usrloc
+path pdb pdt peering perl perlvdb permissions pike pipelimit prefix_route
+presence presence_conference presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml
+pua pua_bla pua_dialoginfo pua_mi pua_reginfo pua_usrloc pua_xmpp purple pv
+qos
+ratelimit regex registrar rls rtimer rr rtpproxy
+sanity sdpops seas sipcapture siptrace siputils sl sms snmpstats speeddial sqlops statistics sst
+textops textopsx tls tm tmx tmrec topoh
+uac uac_redirect uri_db userblacklist usrloc utils
+xcap_client xcap_server xhttp xhttp_rpc xlog xmlops xmlrpc xmpp"
+
+# FIXME: no ebuilds for them
+#db_cassandra? ( thrift dev-db/cassandra )
+#pdb? ( pdb-server )
+#seas? ( www.wesip.eu )
+
+RDEPEND="
+	>=sys-libs/ncurses-5.7
+	>=sys-libs/readline-6.1_p2
+	group_experimental? ( dev-libs/openssl dev-db/redis dev-db/oracle-instantclient-basic )
+	group_mysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_presence? ( dev-libs/libxml2 net-misc/curl )
+	group_postgres? ( dev-db/postgresql-base )
+	group_standard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kmysql? ( >=dev-db/mysql-5.1.50 sys-libs/zlib )
+	group_kradius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+	group_kpresence? ( dev-libs/libxml2 net-misc/curl )
+	group_kpostgres? ( dev-db/postgresql-base )
+	group_kstandard? ( dev-libs/libxml2 dev-libs/openssl net-misc/curl )
+	group_kxml? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	group_kperl? ( dev-lang/perl dev-perl/perl-ldap )
+	group_kldap? ( net-nds/openldap )
+	group_kjson? ( dev-libs/json-c dev-libs/libevent )
+	acc_radius? ( net-dialup/radiusclient-ng )
+	app_lua? ( >=dev-lang/lua-5.1 )
+	app_python? ( dev-lang/python )
+	app_mono? ( dev-lang/mono )
+	auth_identity? ( dev-libs/openssl net-misc/curl )
+	carrierroute? ( dev-libs/confuse )
+	cpl-c? ( dev-libs/libxml2 )
+	db_berkeley? ( >=sys-libs/db-4.6 )
+	db_mysql? ( >=dev-db/mysql-5.1.50 )
+	db_oracle? ( dev-db/oracle-instantclient-basic )
+	db_postgres? ( dev-db/postgresql-base )
+	db_sqlite? ( >=dev-db/sqlite-3 )
+	db_unixodbc? ( dev-db/unixODBC )
+	ndb_redis? ( dev-db/redis )
+	dialplan? ( dev-libs/libpcre )
+	geoip? ( dev-libs/geoip )
+	h350? ( net-nds/openldap )
+	jabber? ( dev-libs/expat )
+	lcr? ( dev-libs/libpcre )
+	ldap? ( net-nds/openldap )
+	memcached? ( dev-libs/libmemcache net-misc/memcached )
+	mi_xmlrpc? ( dev-libs/libxml2 dev-libs/xmlrpc-c )
+	osp? ( net-libs/osptoolkit )
+	peering? ( net-dialup/radiusclient-ng )
+	perl? ( dev-lang/perl dev-perl/perl-ldap )
+	presence? ( dev-libs/libxml2 )
+	presence_conference? ( dev-libs/libxml2 )
+	presence_xml? ( dev-libs/libxml2 )
+	pua? ( dev-libs/libxml2 )
+	pua_bla? ( dev-libs/libxml2 )
+	pua_dialoginfo? ( dev-libs/libxml2 )
+	pua_usrloc? ( dev-libs/libxml2 )
+	pua_xmpp? ( dev-libs/libxml2 )
+	purple? ( net-im/pidgin )
+	regex? ( dev-libs/libpcre )
+	rls? ( dev-libs/libxml2 )
+	snmpstats? ( net-analyzer/net-snmp sys-apps/lm_sensors )
+	tls? (
+		sys-libs/zlib
+		>=dev-libs/openssl-1.0.0a-r1
+	)
+	utils? ( net-misc/curl )
+	xcap_client? ( dev-libs/libxml2 net-misc/curl )
+	xcap_server? ( dev-libs/libxml2 )
+	xmlops? ( dev-libs/libxml2 )
+	xmpp? ( dev-libs/expat )
+"
+DEPEND="${RDEPEND}
+	>=sys-devel/bison-1.35
+	>=sys-devel/flex-2.5.4a
+	app-text/docbook2X"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+
+	use ipv6 || \
+		sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+}
+
+src_compile() {
+	# iptrtpproxy broken as the needed netfilter module is not supported
+	local mod_exc="iptrtpproxy"
+	local group_inc=""
+	local k=""
+	if use flavour_kamailio; then
+		k="k"
+		use group_kxml && group_inc="${group_inc} kxml"
+		use group_kperl && group_inc="${group_inc} kperl"
+		use group_kldap && group_inc="${group_inc} kldap"
+		use group_kjson && group_inc="${group_inc} kjson"
+	fi
+	# you can USE flavour=kamailio but also group_standard. It will be converted to group_kstandard
+	# same as mysql/kmysql, postgres/kpostgres, radius/kradius, presence/kpresence
+	(use group_standard || use group_kstandard) && group_inc="${group_inc} ${k}standard"
+	use group_standard_dep && group_inc="${group_inc} standard_dep"
+	(use group_mysql || use group_kmysql) && group_inc="${group_inc} ${k}mysql"
+	(use group_radius || use group_kradius) && group_inc="${group_inc} ${k}radius"
+	(use group_postgres || use group_kpostgres) && group_inc="${group_inc} ${k}postgres"
+	(use group_presence || use group_kpresence) && group_inc="${group_inc} ${k}presence"
+	use group_stable && group_inc="${group_inc} stable"
+	use group_experimental && group_inc="${group_inc} experimental"
+	# TODO: skip_modules?
+
+	local mod_inc=""
+	# some IUSE flags must not be included here in mod_inc
+	# e.g.: flavour_kamailio, flavour_ser, debug, sctp, ipv6
+	for i in ${IUSE[@]}; do
+		for j in ${i[@]}; do
+			[[ ! "${i}" =~ "flavour_" ]] && \
+				[ ! "${i}" == "debug" ] && \
+				[ ! "${i}" == "ipv6" ] && \
+				[ ! "${i}" == "sctp" ] && \
+				[[ ! "${i}" =~ "group_" ]] && \
+			use "${i}" && mod_inc="${mod_inc} ${i}"
+		done
+	done
+
+	if use tls; then
+		tls_hooks=1
+	else
+		tls_hooks=0
+	fi
+
+	if use debug; then
+		mode=debug
+	else
+		mode=release
+	fi
+
+	if use flavour_kamailio; then
+		flavour=kamailio
+	else
+		flavour=ser # defaults to SER compatibility names
+	fi
+
+	if use sctp; then
+		sctp=1
+	else
+		sctp=0
+	fi
+
+	emake \
+		CC="$(tc-getCC)" \
+		CPU_TYPE="$(get-flag march)" \
+		SCTP="${sctp}" \
+		CC_EXTRA_OPTS=-I/usr/gnu/include \
+		mode="${mode}" \
+		TLS_HOOKS="${tls_hooks}" \
+		FLAVOUR="${flavour}" \
+		group_include="${group_inc}" \
+		include_modules="${mod_inc}" \
+		exclude_modules="${mod_exc}" \
+		prefix="/" \
+		all || die "emake all failed"
+}
+
+src_install() {
+	emake -j1 \
+		BASEDIR="${D}" \
+		FLAVOUR="${flavour}" \
+		prefix="/" \
+		bin_dir=/usr/sbin/ \
+		cfg_dir=/etc/${flavour}/ \
+		lib_dir=/usr/$(get_libdir)/${flavour}/ \
+		modules_dir="/usr/$(get_libdir)/${flavour}/" \
+		man_dir="/usr/share/man/" \
+		doc_dir="/usr/share/doc/${flavour}/" \
+		share_dir="/usr/share/${flavour}/" \
+		data_dir="/usr/share/${flavour}/" \
+		install || die "emake install failed"
+
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.initd > ${flavour}.initd || die
+	sed -e "s/sip-router/${flavour}/g" \
+		${FILESDIR}/ser.confd > ${flavour}.confd || die
+
+	newinitd "${flavour}".initd "${flavour}"
+	newconfd "${flavour}".confd "${flavour}"
+}
+
+pkg_preinst() {
+	if [[ -z "$(egetent passwd ${flavour})" ]]; then
+		einfo "Adding ${flavour} user and group"
+		enewgroup "${flavour}"
+		enewuser  "${flavour}" -1 -1 /dev/null "${flavour}"
+	fi
+
+	chown -R root:"${flavour}"  "${D}/etc/${flavour}"
+	chmod -R u=rwX,g=rX,o= "${D}/etc/${flavour}"
+
+}
+
+pkg_postinst() {
+	if [ use mediaproxy ]; then
+		einfo "You have enabled mediaproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+	if [ use rtpproxy ]; then
+		einfo "You have enabled rtpproxy support. In order to use it, you have
+		to run it somewhere."
+	fi
+}
+
+pkg_prerm () {
+	/etc/init.d/"${flavour}" stop >/dev/null
+}
diff --git a/pkg/ser/netbsd/COMMENT b/pkg/ser/netbsd/COMMENT
new file mode 100644
index 0000000..6cef836
--- /dev/null
+++ b/pkg/ser/netbsd/COMMENT
@@ -0,0 +1 @@
+Sip Express Router, very fast and configurable SIP proxy
diff --git a/pkg/ser/netbsd/DESCR b/pkg/ser/netbsd/DESCR
new file mode 100644
index 0000000..91c29ad
--- /dev/null
+++ b/pkg/ser/netbsd/DESCR
@@ -0,0 +1,16 @@
+ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: Digest Authentication,
+CPL scripts, Instant Messaging, MySQL support, Presence Agent, Radius
+Authentication, Record Routing, SMS Gateway, Jabber Gateway, Transaction
+Module, Registrar, User Location, NAT Traversal, a.s.o.
+
+
+WWW: http://www.iptel.org/ser/
+
+- Andrei Pelinescu-Onciul
+andrei at iptel.org
+
diff --git a/pkg/ser/netbsd/Makefile b/pkg/ser/netbsd/Makefile
new file mode 100644
index 0000000..502ab4c
--- /dev/null
+++ b/pkg/ser/netbsd/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for:    ser
+# Date created:        6 November 2002
+# Whom:                andrei
+#
+# $NetBSD$
+#
+# $Id$
+#
+
+COMMENT= "SIP Express Router"
+
+PORTNAME= ser
+PORTVERSION= 0.9.4
+CATEGORIES= net
+MASTER_SITES= ftp://ftp.iptel.org/pub/ser/0.9.4/src/
+
+MAINTAINER= andrei at iptel.org
+
+MAN8=ser.8
+MAN5=ser.cfg.5
+# MANCOMPRESSED must not be specified (if defined is assumed to be yes)
+
+# netbsd 2.0
+USE_TOOLS+=	gmake
+#netbsd 1.6
+USE_GMAKE= yes     
+# we override the DISTFILE NAME
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+DISTFILES= ${DISTNAME}_src.tar.gz
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+# build by default mysql and jabber
+MAKE_ENV= include_modules="mysql jabber cpl-c pa"
+
+# depends on expat, mysqlclient and libxml2 because of the above modules
+DEPENDS= expat-[0-9]*:../../textproc/expat \
+         mysql-client>=3.23.35:../../databases/mysql-client \
+         libxml2*:../../textproc/libxml2
+
+#.include "/usr/pkgsrc/mk/bsd.prefs.mk"
+
+pre-fetch:
+
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../databases/mysql-client/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
+
+
diff --git a/pkg/ser/netbsd/PLIST b/pkg/ser/netbsd/PLIST
new file mode 100644
index 0000000..4231118
--- /dev/null
+++ b/pkg/ser/netbsd/PLIST
@@ -0,0 +1,102 @@
+etc/ser/dictionary.ser
+etc/ser/ser.cfg
+lib/ser/modules/acc_db.so
+lib/ser/modules/acc_syslog.so
+lib/ser/modules/auth.so
+lib/ser/modules/auth_db.so
+lib/ser/modules/avp.so
+lib/ser/modules/avp_db.so
+lib/ser/modules/avpops.so
+lib/ser/modules/cpl-c.so
+lib/ser/modules/ctl.so
+lib/ser/modules/db_ops.so
+lib/ser/modules/dbtext.so
+lib/ser/modules/dialog.so
+lib/ser/modules/dispatcher.so
+lib/ser/modules/domain.so
+lib/ser/modules/enum.so
+lib/ser/modules/exec.so
+lib/ser/modules/flatstore.so
+lib/ser/modules/gflags.so
+lib/ser/modules/jabber.so
+lib/ser/modules/lcr.so
+lib/ser/modules/maxfwd.so
+lib/ser/modules/mediaproxy.so
+lib/ser/modules/msilo.so
+lib/ser/modules/mysql.so
+lib/ser/modules/nathelper.so
+lib/ser/modules/options.so
+lib/ser/modules/pa.so
+lib/ser/modules/pdt.so
+lib/ser/modules/permissions.so
+lib/ser/modules/pike.so
+lib/ser/modules/print.so
+lib/ser/modules/ratelimit.so
+lib/ser/modules/registrar.so
+lib/ser/modules/rr.so
+lib/ser/modules/sl.so
+lib/ser/modules/sms.so
+lib/ser/modules/speeddial.so
+lib/ser/modules/textops.so
+lib/ser/modules/tm.so
+lib/ser/modules/uac.so
+lib/ser/modules/uri.so
+lib/ser/modules/uri_db.so
+lib/ser/modules/usrloc.so
+lib/ser/modules/xlog.so
+lib/ser/modules/xmlrpc.so
+sbin/ser
+sbin/ser_mysql.sh
+sbin/serunix
+share/doc/ser/AUTHORS
+share/doc/ser/INSTALL
+share/doc/ser/NEWS
+share/doc/ser/README
+share/doc/ser/README-MODULES
+share/doc/ser/README.acc_db
+share/doc/ser/README.acc_syslog
+share/doc/ser/README.auth
+share/doc/ser/README.auth_db
+share/doc/ser/README.avp
+share/doc/ser/README.avp_db
+share/doc/ser/README.avpops
+share/doc/ser/README.cpl-c
+share/doc/ser/README.dbtext
+share/doc/ser/README.dialog
+share/doc/ser/README.dispatcher
+share/doc/ser/README.domain
+share/doc/ser/README.enum
+share/doc/ser/README.eval
+share/doc/ser/README.exec
+share/doc/ser/README.flatstore
+share/doc/ser/README.gflags
+share/doc/ser/README.jabber
+share/doc/ser/README.lcr
+share/doc/ser/README.maxfwd
+share/doc/ser/README.msilo
+share/doc/ser/README.nathelper
+share/doc/ser/README.options
+share/doc/ser/README.pa
+share/doc/ser/README.pdt
+share/doc/ser/README.permissions
+share/doc/ser/README.pike
+share/doc/ser/README.print
+share/doc/ser/README.ratelimit
+share/doc/ser/README.registrar
+share/doc/ser/README.rr
+share/doc/ser/README.sl
+share/doc/ser/README.sms
+share/doc/ser/README.speeddial
+share/doc/ser/README.textops
+share/doc/ser/README.timer
+share/doc/ser/README.tm
+share/doc/ser/README.uac
+share/doc/ser/README.uri
+share/doc/ser/README.uri_db
+share/doc/ser/README.usrloc
+share/doc/ser/README.xlog
+share/doc/ser/README.xmlrpc
+ at dirrm share/doc/ser
+ at dirrm etc/ser
+ at dirrm lib/ser/modules
+ at dirrm lib/ser
diff --git a/pkg/ser/netbsd/distinfo b/pkg/ser/netbsd/distinfo
new file mode 100644
index 0000000..995bc51
--- /dev/null
+++ b/pkg/ser/netbsd/distinfo
@@ -0,0 +1 @@
+MD5 (ser-0.9.4_src.tar.gz) = d12d56d76c86b59dd51a43b3251b7d3a
diff --git a/pkg/ser/openbsd/Makefile b/pkg/ser/openbsd/Makefile
new file mode 100644
index 0000000..69109d1
--- /dev/null
+++ b/pkg/ser/openbsd/Makefile
@@ -0,0 +1,54 @@
+# New ports collection makefile for:    ser
+# Date created:        6 November 2002
+# Whom:                andrei
+#
+# $OpenBSD$
+#
+# $Id$
+#
+
+COMMENT= "SIP Express Router"
+
+PORTNAME= ser
+PORTVERSION= 0.9.4
+CATEGORIES= net
+MASTER_SITES= ftp://ftp.iptel.org/pub/ser/0.9.4/src/
+
+MAINTAINER= andrei at iptel.org 
+
+MAN8=ser.8
+MAN5=ser.cfg.5
+# MANCOMPRESSED must not be defined in openbsd (defined==yes)
+
+# GPL
+PERMIT_PACKAGE_CDROM=	Yes
+PERMIT_PACKAGE_FTP=	Yes
+PERMIT_DISTFILES_CDROM=	Yes
+PERMIT_DISTFILES_FTP=	Yes
+
+
+USE_GMAKE= yes
+# we override the DISTFILE NAME
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+DISTFILES= ${DISTNAME}_src.tar.gz
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+# build by default mysql and jabber
+MAKE_ENV= include_modules="mysql jabber cpl-c pa"
+
+# depends on mysql and libexpat because of the above modules
+BUILD_DEPENDS= :expat-1.*:textproc/expat \
+               :mysql-client-[3-].*:databases/mysql \
+               :libxml-2.*:textproc/libxml
+LIB_DEPENDS=   expat.2:expat-1.*:textproc/expat \
+               lib/mysql/mysqlclient.10:mysql-client-[3-].*:databases/mysql \
+               xml2:libxml-2.*:textproc/libxml
+
+
+
+pre-fetch:
+
+
+.include <bsd.port.mk>
+
+
diff --git a/pkg/ser/openbsd/distinfo b/pkg/ser/openbsd/distinfo
new file mode 100644
index 0000000..995bc51
--- /dev/null
+++ b/pkg/ser/openbsd/distinfo
@@ -0,0 +1 @@
+MD5 (ser-0.9.4_src.tar.gz) = d12d56d76c86b59dd51a43b3251b7d3a
diff --git a/pkg/ser/openbsd/pkg/COMMENT b/pkg/ser/openbsd/pkg/COMMENT
new file mode 100644
index 0000000..6cef836
--- /dev/null
+++ b/pkg/ser/openbsd/pkg/COMMENT
@@ -0,0 +1 @@
+Sip Express Router, very fast and configurable SIP proxy
diff --git a/pkg/ser/openbsd/pkg/DESCR b/pkg/ser/openbsd/pkg/DESCR
new file mode 100644
index 0000000..af5e7bf
--- /dev/null
+++ b/pkg/ser/openbsd/pkg/DESCR
@@ -0,0 +1,15 @@
+ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: Digest Authentication,
+CPL scripts, Instant Messaging, MySQL support, Presence Agent, Radius
+Authentication, Record Routing, SMS Gateway, Jabber Gateway, Transaction
+Module, Registrar, User Location, NAT Traversal, a.s.o.
+
+
+WWW: http://www.iptel.org/ser/
+
+- Andrei Pelinescu-Onciul
+andrei at iptel.org
diff --git a/pkg/ser/openbsd/pkg/PLIST b/pkg/ser/openbsd/pkg/PLIST
new file mode 100644
index 0000000..2c560cc
--- /dev/null
+++ b/pkg/ser/openbsd/pkg/PLIST
@@ -0,0 +1,106 @@
+etc/ser/dictionary.ser
+etc/ser/ser.cfg
+lib/ser/modules/acc_db.so
+lib/ser/modules/acc_syslog.so
+lib/ser/modules/auth.so
+lib/ser/modules/auth_db.so
+lib/ser/modules/avp.so
+lib/ser/modules/avp_db.so
+lib/ser/modules/avpops.so
+lib/ser/modules/cpl-c.so
+lib/ser/modules/ctl.so
+lib/ser/modules/db_ops.so
+lib/ser/modules/dbtext.so
+lib/ser/modules/dialog.so
+lib/ser/modules/dispatcher.so
+lib/ser/modules/domain.so
+lib/ser/modules/enum.so
+lib/ser/modules/eval.so
+lib/ser/modules/exec.so
+lib/ser/modules/flatstore.so
+lib/ser/modules/gflags.so
+lib/ser/modules/jabber.so
+lib/ser/modules/lcr.so
+lib/ser/modules/maxfwd.so
+lib/ser/modules/mediaproxy.so
+lib/ser/modules/msilo.so
+lib/ser/modules/mysql.so
+lib/ser/modules/nathelper.so
+lib/ser/modules/options.so
+lib/ser/modules/pa.so
+lib/ser/modules/pdt.so
+lib/ser/modules/permissions.so
+lib/ser/modules/pike.so
+lib/ser/modules/print.so
+lib/ser/modules/ratelimit.so
+lib/ser/modules/registrar.so
+lib/ser/modules/rr.so
+lib/ser/modules/sl.so
+lib/ser/modules/sms.so
+lib/ser/modules/speeddial.so
+lib/ser/modules/textops.so
+lib/ser/modules/timer.so
+lib/ser/modules/tm.so
+lib/ser/modules/uac.so
+lib/ser/modules/uri.so
+lib/ser/modules/uri_db.so
+lib/ser/modules/usrloc.so
+lib/ser/modules/xlog.so
+lib/ser/modules/xmlrpc.so
+sbin/ser
+sbin/ser_mysql.sh
+sbin/serunix
+share/doc/ser/AUTHORS
+share/doc/ser/INSTALL
+share/doc/ser/NEWS
+share/doc/ser/README
+share/doc/ser/README-MODULES
+share/doc/ser/README.acc_db
+share/doc/ser/README.acc_syslog
+share/doc/ser/README.auth
+share/doc/ser/README.auth_db
+share/doc/ser/README.avp
+share/doc/ser/README.avp_db
+share/doc/ser/README.avpops
+share/doc/ser/README.cpl-c
+share/doc/ser/README.ctl
+share/doc/ser/README.db_ops
+share/doc/ser/README.dbtext
+share/doc/ser/README.dialog
+share/doc/ser/README.dispatcher
+share/doc/ser/README.domain
+share/doc/ser/README.enum
+share/doc/ser/README.eval
+share/doc/ser/README.exec
+share/doc/ser/README.flatstore
+share/doc/ser/README.gflags
+share/doc/ser/README.jabber
+share/doc/ser/README.lcr
+share/doc/ser/README.maxfwd
+share/doc/ser/README.msilo
+share/doc/ser/README.nathelper
+share/doc/ser/README.options
+share/doc/ser/README.pa
+share/doc/ser/README.pdt
+share/doc/ser/README.permissions
+share/doc/ser/README.pike
+share/doc/ser/README.print
+share/doc/ser/README.ratelimit
+share/doc/ser/README.registrar
+share/doc/ser/README.rr
+share/doc/ser/README.sl
+share/doc/ser/README.sms
+share/doc/ser/README.speeddial
+share/doc/ser/README.textops
+share/doc/ser/README.timer
+share/doc/ser/README.tm
+share/doc/ser/README.uac
+share/doc/ser/README.uri
+share/doc/ser/README.uri_db
+share/doc/ser/README.usrloc
+share/doc/ser/README.xlog
+share/doc/ser/README.xmlrpc
+ at dirrm share/doc/ser
+ at dirrm etc/ser
+ at dirrm lib/ser/modules
+ at dirrm lib/ser
diff --git a/pkg/ser/opensuse/ser.init.SuSE b/pkg/ser/opensuse/ser.init.SuSE
new file mode 100644
index 0000000..8bde2b8
--- /dev/null
+++ b/pkg/ser/opensuse/ser.init.SuSE
@@ -0,0 +1,136 @@
+#! /bin/sh
+# Copyright (c) 2002 Frauenhofer Gesellschaft FOKUS, Germany.
+# All rights reserved.
+#
+# Author: Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+#
+# /etc/init.d/ser
+#
+### BEGIN INIT INFO
+# Provides:          sip
+# Required-Start:    $network
+# X-UnitedLinux-Should-Start: $network
+# Required-Stop:     $network
+# X-UnitedLinux-Should-Stop: $network
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: SIP Express Router
+# Description:       Start SER and provide the routing of SIP requests.
+### END INIT INFO
+
+
+# Check for missing binaries (stale symlinks should not happen)
+SER_BIN=/usr/sbin/ser
+test -x $SER_BIN || exit 5
+
+# Check for existence of needed config file and read it
+SER_CONFIG=/etc/ser/ser.cfg
+test -r $SER_CONFIG || exit 6
+#. $SER_CONFIG
+
+# Shell functions sourced from /etc/rc.status:
+#      rc_check         check and set local and overall rc status
+#      rc_status        check and set local and overall rc status
+#      rc_status -v     ditto but be verbose in local rc status
+#      rc_status -v -r  ditto and clear the local rc status
+#      rc_status -s     display "skipped" and exit with status 3
+#      rc_status -u     display "unused" and exit with status 3
+#      rc_failed        set local and overall rc status to failed
+#      rc_failed <num>  set local and overall rc status to <num>
+#      rc_reset         clear local rc status (overall remains)
+#      rc_exit          exit appropriate to overall rc status
+#      rc_active	checks whether a service is activated by symlinks
+#      rc_splash arg    sets the boot splash screen to arg (if active)
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0	  - success
+# 1       - generic or unspecified error
+# 2       - invalid or excess argument(s)
+# 3       - unimplemented feature (e.g. "reload")
+# 4       - user had insufficient privileges
+# 5       - program is not installed
+# 6       - program is not configured
+# 7       - program is not running
+# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+# 
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+case "$1" in
+    start)
+	echo -n "Starting SIP Express Router "
+	## Start daemon with startproc(8). If this fails
+	## the return value is set appropriately by startproc.
+	startproc $SER_BIN -f $SER_CONFIG
+
+	# Remember status and be verbose
+	rc_status -v
+	;;
+    stop)
+	echo -n "Shutting down SIP Express Router "
+	## Stop daemon with killproc(8) and if this fails
+	## killproc sets the return value according to LSB.
+
+	killproc -TERM $SER_BIN
+
+	# Remember status and be verbose
+	rc_status -v
+	;;
+    restart)
+	## Stop the service and regardless of whether it was
+	## running or not, start it again.
+	$0 stop
+	$0 start
+
+	# Remember status and be quiet
+	rc_status
+	;;
+    force-reload)
+	## Signal the daemon to reload its config. Most daemons
+	## do this on signal 1 (SIGHUP).
+	## If it does not support it, restart.
+
+	echo -n "Reload service SIP Express Router "
+	## Otherwise:
+	$0 stop  &&  $0 start
+	rc_status
+	;;
+    reload)
+	## Like force-reload, but if daemon does not support
+	## signaling, do nothing (!)
+
+	## Otherwise if it does not support reload:
+	rc_failed 3
+	rc_status -v
+	;;
+    status)
+	echo -n "Checking for service SIP Express Router "
+	## Check status with checkproc(8), if process is running
+	## checkproc will return with exit status 0.
+
+	# Return value is slightly different for the status command:
+	# 0 - service up and running
+	# 1 - service dead, but /var/run/  pid  file exists
+	# 2 - service dead, but /var/lock/ lock file exists
+	# 3 - service not running (unused)
+	# 4 - service status unknown :-(
+	# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
+	
+	# NOTE: checkproc returns LSB compliant status values.
+	checkproc $SER_BIN
+	# NOTE: rc_status knows that we called this init script with
+	# "status" option and adapts its messages accordingly.
+	rc_status -v
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|restart}"
+	exit 1
+	;;
+esac
+rc_exit
diff --git a/pkg/ser/opensuse/ser.spec b/pkg/ser/opensuse/ser.spec
new file mode 100644
index 0000000..2164049
--- /dev/null
+++ b/pkg/ser/opensuse/ser.spec
@@ -0,0 +1,333 @@
+%define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius postgres snmp cpl cpl-c extcmd 
+%define MYSQL_MODULES		mysql
+%define JABBER_MODULES		jabber
+%define RADIUS_MODULES		auth_radius group_radius uri_radius
+%define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
+
+
+Summary:      SIP Express Router, very fast and flexible SIP Proxy
+Name:         ser
+Version:      0.9.6
+Release:      22.1
+Packager:     Peter Nixon <peter+rpmspam at suntel.com.tr>
+License:      GPL
+Group:        Productivity/Telephony/SIP/Servers
+Source:       http://iptel.org/ser/stable/%{name}-%{version}_src.tar.bz2
+Source2:      ser.init.SuSE
+%ifarch x86_64
+Patch:        Makefile.defs.patch
+%endif
+URL:          http://www.iptel.org/ser
+Vendor:       FhG Fokus
+BuildRoot:    /var/tmp/%{name}-%{version}-root
+Conflicts:    ser < %{version}, ser-mysql < %{version}, ser-jabber < %{version}, ser-radius < %{version}
+BuildPrereq:  make flex bison 
+BuildRequires: mysql-devel, radiusclient, expat
+
+%description
+SIP Express Router (SER) is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, SER can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL support, a presence agent, radius
+authentication, record routing, an SMS Gateway, a jabber gateway, a 
+transaction module, registrar and user location.
+
+%package  mysql
+Summary:  MySQL connectivity for the SIP Express Router.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq: mysql-devel zlib-devel
+
+%description mysql
+The ser-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  jabber
+Summary:  sip jabber message translation support for the SIP Express Router.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq: expat
+
+%description jabber
+The ser-jabber package contains a sip to jabber message translator.
+
+%package  radius
+Summary:  ser radius authentication, group and uri check modules.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq:  radiusclient
+
+%description radius
+The ser-radius package contains modules for radius authentication, group
+ membership and uri checking.
+
+%prep
+%setup
+%ifarch x86_64
+%patch
+%endif
+
+%build
+make all skip_modules="%EXCLUDED_MODULES" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%MYSQL_MODULES" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%JABBER_MODULES" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+make modules modules="%RADIUS_MOD_PATH" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install skip_modules="%EXCLUDED_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="%RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-doc modules="modules/%JABBER_MODULES %RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
+install -m755 $RPM_SOURCE_DIR/ser.init.SuSE \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ser
+ln -sf ../../etc/init.d/ser $RPM_BUILD_ROOT/usr/sbin/rcser
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%post
+sbin/insserv etc/init.d/ser
+
+%preun
+if [ $1 = 0 ]; then
+    etc/init.d/ser stop > /dev/null 2>&1
+fi
+
+%postun
+sbin/insserv etc/init.d/
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/ser
+%doc %{_docdir}/ser/*
+
+%dir %{_sysconfdir}/ser
+%config(noreplace) %{_sysconfdir}/ser/*
+%config %{_sysconfdir}/init.d/*
+
+#%ifarch x86_64
+#%else
+%dir %{_libdir}/ser
+%dir %{_libdir}/ser/modules
+%{_libdir}/ser/modules/acc.so
+%{_libdir}/ser/modules/auth.so
+%{_libdir}/ser/modules/auth_db.so
+%{_libdir}/ser/modules/auth_diameter.so
+%{_libdir}/ser/modules/dbtext.so
+%{_libdir}/ser/modules/domain.so
+%{_libdir}/ser/modules/enum.so
+%{_libdir}/ser/modules/exec.so
+%{_libdir}/ser/modules/group.so
+%{_libdir}/ser/modules/mangler.so
+%{_libdir}/ser/modules/maxfwd.so
+%{_libdir}/ser/modules/mediaproxy.so
+%{_libdir}/ser/modules/msilo.so
+%{_libdir}/ser/modules/nathelper.so
+%{_libdir}/ser/modules/pdt.so
+%{_libdir}/ser/modules/permissions.so
+%{_libdir}/ser/modules/pike.so
+%{_libdir}/ser/modules/print.so
+%{_libdir}/ser/modules/registrar.so
+%{_libdir}/ser/modules/rr.so
+%{_libdir}/ser/modules/sl.so
+%{_libdir}/ser/modules/sms.so
+%{_libdir}/ser/modules/textops.so
+%{_libdir}/ser/modules/tm.so
+%{_libdir}/ser/modules/uri.so
+%{_libdir}/ser/modules/usrloc.so
+%{_libdir}/ser/modules/xlog.so
+
+%{_libdir}/ser/modules/avp.so
+%{_libdir}/ser/modules/avp_db.so
+%{_libdir}/ser/modules/avpops.so
+%{_libdir}/ser/modules/dispatcher.so
+%{_libdir}/ser/modules/diversion.so
+%{_libdir}/ser/modules/flatstore.so
+%{_libdir}/ser/modules/gflags.so
+%{_libdir}/ser/modules/options.so
+%{_libdir}/ser/modules/speeddial.so
+%{_libdir}/ser/modules/uri_db.so
+#%endif
+%{_sbindir}/ser
+%{_sbindir}/serctl
+%{_sbindir}/serunix
+/usr/sbin/rcser
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+
+%files mysql
+%defattr(-,root,root)
+
+#%ifarch x86_64
+#%else
+%{_libdir}/ser/modules/mysql.so
+#%endif
+%{_sbindir}/ser_mysql.sh
+
+%files jabber
+%defattr(-,root,root)
+#%ifarch x86_64
+#%else
+%{_libdir}/ser/modules/jabber.so
+#%endif
+%doc %{_docdir}/ser/README.jabber
+
+%files radius
+%defattr(-,root,root)
+#%{_libdir}/ser/modules/auth_radius.so
+#%{_libdir}/ser/modules/group_radius.so
+#%{_libdir}/ser/modules/uri_radius.so
+%doc %{_docdir}/ser/README.auth_radius
+%doc %{_docdir}/ser/README.group_radius
+%doc %{_docdir}/ser/README.uri_radius
+
+
+
+
+%changelog
+
+* Tue Jul 26 2005 Peter Nixon - Suntel Communications <peter+rpmspam at suntel.com.tr>
+- include SUSE version in the rpm filename(s)
+- changed version to 0.9.3 (new upstream release)
+- update rpm package group to match SUSE 9.3
+- removed files no longer in tarball
+- enabled radius modules
+- add symlink for rcser
+
+* Tue Jul 27 2004 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.14 (new upstream release)
+- added ext to the modules list, removed the radius modules (they depend on radiusclient-ng now)
+
+* Fri Nov 14 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.12 (new upstream release)
+- added auth_diameter, pdt & mangler to the modules list
+
+* Wed Aug 28 2003 Nils Ohlmeier <nils at iptel.org>
+- replaced modules Conflicts with required Ser version
+- fixed doc installation for SuSE pathes
+- added doc for jabber and radius
+
+* Wed Aug 28 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added doc (READMEs, NEWS, AUTHORS a.s.o)
+- added xlog to the modules list
+
+* Wed Aug 27 2003 Nils Ohlmeier <nils at iptel.org>
+- fixed module dependencys
+- added Conflicts for modules
+
+* Wed Aug 27 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.11
+- gen_ha1 is now left in _sbindir
+- removed harv_ser.sh
+- added Conflicts
+
+* Mon Jun 2 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added a separate rpm for the radius modules
+- updated to the new makefile variables (removed lots of unnecessary stuff)
+
+* Tue Nov 12 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- replaced expat-devel with expat
+- removed leading + from a few lines
+
+* Tue Nov 12 2002 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.gmd.de>
+- added a separate rpm for the jabber modules
+- moved all the binaries to sbin
+- removed obsolete installs (make install installs everything now)
+
+* Mon Oct 28 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Added mysql and mysql-devel to the Req for the ser-mysql rpm.
+
+* Thu Sep 26 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Added library path to mysql/Makefile to build on SuSE 8.0
+
+* Thu Sep 26 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Added 'make [modules|modules-install]' to adapted Makefile changes
+
+* Wed Sep 25 2002 Andrei Pelinescu - Onciul  <pelinescu-onciul at fokus.gmd.de>
+- modified make install & make: added cfg-target & modules-target
+
+* Wed Sep 25 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Copyed mysql connectivity subpackage from orig rpm.spec.
+
+* Fri Sep 06 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Adaptation to SuSE.
+
+* Mon Sep 02 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- gen_ha1 utility added, scripts added.
+
+* Tue Aug 28 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Finished the first version of the spec file.
+
+* Sun Aug 12 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- First version of the spec file.
diff --git a/pkg/ser/rpm/ser.init b/pkg/ser/rpm/ser.init
new file mode 100755
index 0000000..c9637b1
--- /dev/null
+++ b/pkg/ser/rpm/ser.init
@@ -0,0 +1,72 @@
+#!/bin/bash
+#
+# Startup script for SER
+#
+# chkconfig: 345 85 15
+# description: Ser is a fast SIP Proxy.
+#
+# processname: ser
+# pidfile: /var/run/ser.pid
+# config: /etc/ser/ser.cfg
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+ser=/usr/sbin/ser
+prog=ser
+RETVAL=0
+
+start() {
+        echo -n $"Starting $prog: "
+	ulimit -c unlimited
+	ulimit -n 16384
+        daemon $ser $OPTIONS
+        RETVAL=$?
+        echo
+        [ $RETVAL = 0 ] && touch /var/lock/subsys/ser
+        return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	killproc $ser
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f /var/lock/subsys/ser /var/run/ser.pid
+}
+
+reload() {
+	echo -n $"Reloading $prog: "
+	killproc $ser -HUP
+	RETVAL=$?
+	echo
+}
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+        status $ser
+	RETVAL=$?
+	;;
+  restart)
+	stop
+	start
+	;;
+  condrestart)
+	if [ -f /var/run/ser.pid ] ; then
+		stop
+		start
+	fi
+	;;
+  *)
+	echo $"Usage: $prog {start|stop|restart|condrestart|status|help}"
+	exit 1
+esac
+
+exit $RETVAL
diff --git a/pkg/ser/rpm/ser.spec-4.1 b/pkg/ser/rpm/ser.spec-4.1
new file mode 100644
index 0000000..0e44c19
--- /dev/null
+++ b/pkg/ser/rpm/ser.spec-4.1
@@ -0,0 +1,328 @@
+%define name    ser
+%define ver     2.1.0
+%define rel     dev23b
+
+%define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius postgres snmp cpl cpl-c extcmd ldap
+%define MYSQL_MODULES		mysql
+%define JABBER_MODULES		jabber
+%define RADIUS_MODULES		auth_radius group_radius uri_radius
+%define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
+
+Summary:      SIP Express Router, very fast and flexible SIP Proxy
+Name:         %name
+Version:      %ver
+Release:      %rel
+Packager:     Jan Janak <jan at iptel.org>
+Copyright:    GPL
+Group:        System Environment/Daemons
+Source:       http://ftp.iptel.org/pub/ser/%{ver}/src/%{name}-%{ver}-%{rel}_src.tar.gz
+Source2:      ser.init
+URL:          http://iptel.org/ser
+Vendor:       FhG FOKUS
+BuildRoot:    /var/tmp/%{name}-%{ver}-root
+Conflicts:    ser-mysql < %ver, ser-jabber < %ver, ser-radius < %ver
+BuildPrereq:  make flex bison
+
+
+%description
+Ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL support, a presence agent, radius
+authentication, record routing, an SMS gateway, a jabber gateway, a 
+transaction module, registrar and user location.
+
+%package  mysql
+Summary:  MySQL connectivity for the SIP Express Router.
+Group:    System Environment/Daemons
+Requires: ser = %ver
+BuildPrereq:  mysql-devel zlib-devel
+
+%description mysql
+The ser-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  jabber
+Summary:  sip jabber message translation support for the SIP Express Router.
+Group:    System Environment/Daemons
+Requires: ser = %ver
+BuildPrereq:  expat-devel
+
+%description jabber
+The ser-jabber package contains a sip to jabber message translator.
+
+#%package  radius
+#Summary:  ser radius authentication, group and uri check modules.
+#Group:    System Environment/Daemons
+#Requires: ser = %ver
+#BuildPrereq:  radiusclient-devel
+
+#%description radius
+#The ser-radius package contains modules for radius authentication, group
+# membership and uri checking.
+
+%prep
+%setup -n %{name}-%{ver}-%{rel}
+
+%build
+make all include_modules="tls" skip_modules="%EXCLUDED_MODULES"      cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%MYSQL_MODULES"  cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%JABBER_MODULES" cfg-target=/%{_sysconfdir}/ser/
+make modules modules="%RADIUS_MOD_PATH"        cfg-target=/%{_sysconfdir}/ser/
+
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install include_modules="tls" skip_modules="%EXCLUDED_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-doc modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ 
+#make install-modules modules="%RADIUS_MOD_PATH" \
+#		basedir=$RPM_BUILD_ROOT \
+#		prefix=/usr \
+#		cfg-prefix=$RPM_BUILD_ROOT \
+#		cfg-target=/%{_sysconfdir}/ser/ 
+#make install-doc modules="%RADIUS_MOD_PATH" \
+#		basedir=$RPM_BUILD_ROOT \
+#		prefix=/usr \
+#		cfg-prefix=$RPM_BUILD_ROOT \
+#		cfg-target=/%{_sysconfdir}/ser/ 
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+install -m755 $RPM_SOURCE_DIR/ser.init \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/ser
+
+
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%post
+/sbin/chkconfig --add ser
+
+%preun
+if [ $1 = 0 ]; then
+    /sbin/service ser stop > /dev/null 2>&1
+    /sbin/chkconfig --del ser
+fi
+
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/ser
+%doc %{_docdir}/ser/AUTHORS
+%doc %{_docdir}/ser/NEWS
+%doc %{_docdir}/ser/INSTALL
+%doc %{_docdir}/ser/README
+%doc %{_docdir}/ser/README-MODULES
+%doc %{_docdir}/ser/README.acc_syslog
+%doc %{_docdir}/ser/README.auth
+%doc %{_docdir}/ser/README.auth_db
+%doc %{_docdir}/ser/README.avp
+%doc %{_docdir}/ser/README.avp_db
+%doc %{_docdir}/ser/README.cfg_db
+%doc %{_docdir}/ser/README.db_ops
+%doc %{_docdir}/ser/README.dispatcher
+%doc %{_docdir}/ser/README.diversion
+%doc %{_docdir}/ser/README.domain
+%doc %{_docdir}/ser/README.enum
+%doc %{_docdir}/ser/README.eval
+%doc %{_docdir}/ser/README.exec
+%doc %{_docdir}/ser/README.flatstore
+%doc %{_docdir}/ser/README.gflags
+%doc %{_docdir}/ser/README.lcr
+%doc %{_docdir}/ser/README.maxfwd
+%doc %{_docdir}/ser/README.msilo
+%doc %{_docdir}/ser/README.nathelper
+%doc %{_docdir}/ser/README.options
+%doc %{_docdir}/ser/README.pdt
+%doc %{_docdir}/ser/README.permissions
+%doc %{_docdir}/ser/README.pike
+%doc %{_docdir}/ser/README.prefix_route
+%doc %{_docdir}/ser/README.print
+%doc %{_docdir}/ser/README.ratelimit
+%doc %{_docdir}/ser/README.registrar
+%doc %{_docdir}/ser/README.rr
+%doc %{_docdir}/ser/README.sanity
+%doc %{_docdir}/ser/README.sl
+%doc %{_docdir}/ser/README.sms
+%doc %{_docdir}/ser/README.speeddial
+%doc %{_docdir}/ser/README.textops
+%doc %{_docdir}/ser/README.timer
+%doc %{_docdir}/ser/README.tls
+%doc %{_docdir}/ser/README.tm
+%doc %{_docdir}/ser/README.uac
+%doc %{_docdir}/ser/README.uri
+%doc %{_docdir}/ser/README.uri_db
+%doc %{_docdir}/ser/README.usrloc
+%doc %{_docdir}/ser/README.xlog
+
+%dir %{_sysconfdir}/ser
+%config(noreplace) %{_sysconfdir}/ser/*
+%config %{_sysconfdir}/rc.d/init.d/*
+
+%dir %{_libdir}/ser
+%{_libdir}/ser/libser_cds.so
+%{_libdir}/ser/libser_cds.so.0
+%{_libdir}/ser/libser_cds.so.0.1
+%dir %{_libdir}/ser/modules
+%{_libdir}/ser/modules/acc_db.so
+%{_libdir}/ser/modules/acc_syslog.so
+%{_libdir}/ser/modules/auth.so
+%{_libdir}/ser/modules/auth_db.so
+%{_libdir}/ser/modules/avp.so
+%{_libdir}/ser/modules/avp_db.so
+%{_libdir}/ser/modules/blst.so
+%{_libdir}/ser/modules/cfg_db.so
+%{_libdir}/ser/modules/cfg_rpc.so
+%{_libdir}/ser/modules/ctl.so
+%{_libdir}/ser/modules/db_ops.so
+%{_libdir}/ser/modules/dispatcher.so
+%{_libdir}/ser/modules/diversion.so
+%{_libdir}/ser/modules/domain.so
+%{_libdir}/ser/modules/enum.so
+%{_libdir}/ser/modules/eval.so
+%{_libdir}/ser/modules/exec.so
+%{_libdir}/ser/modules/fifo.so
+%{_libdir}/ser/modules/flatstore.so
+%{_libdir}/ser/modules/gflags.so
+%{_libdir}/ser/modules/lcr.so
+%{_libdir}/ser/modules/maxfwd.so
+%{_libdir}/ser/modules/mediaproxy.so
+%{_libdir}/ser/modules/msilo.so
+%{_libdir}/ser/modules/nathelper.so
+%{_libdir}/ser/modules/options.so
+%{_libdir}/ser/modules/pdt.so
+%{_libdir}/ser/modules/permissions.so
+%{_libdir}/ser/modules/pike.so
+%{_libdir}/ser/modules/prefix_route.so
+%{_libdir}/ser/modules/print.so
+%{_libdir}/ser/modules/ratelimit.so
+%{_libdir}/ser/modules/registrar.so
+%{_libdir}/ser/modules/rr.so
+%{_libdir}/ser/modules/sanity.so
+%{_libdir}/ser/modules/sl.so
+%{_libdir}/ser/modules/sms.so
+%{_libdir}/ser/modules/speeddial.so
+%{_libdir}/ser/modules/textops.so
+%{_libdir}/ser/modules/timer.so
+%{_libdir}/ser/modules/tls.so
+%{_libdir}/ser/modules/tm.so
+%{_libdir}/ser/modules/uac.so
+%{_libdir}/ser/modules/uri.so
+%{_libdir}/ser/modules/uri_db.so
+%{_libdir}/ser/modules/usrloc.so
+%{_libdir}/ser/modules/xlog.so
+
+%{_sbindir}/ser
+%{_sbindir}/sercmd
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+
+%files mysql
+%defattr(-,root,root)
+
+%{_libdir}/ser/modules/mysql.so
+%{_sbindir}/ser_mysql.sh
+/usr/share/ser/*.sql
+
+%files jabber
+%defattr(-,root,root)
+%doc %{_docdir}/ser/README.jabber
+
+%{_libdir}/ser/modules/jabber.so
+
+#%files radius
+#%defattr(-,root,root)
+#%doc %{_docdir}/ser/README.auth_radius
+#%doc %{_docdir}/ser/README.group_radius
+#%doc %{_docdir}/ser/README.uri_radius
+
+#%{_libdir}/ser/modules/auth_radius.so
+#%{_libdir}/ser/modules/group_radius.so
+#%{_libdir}/ser/modules/uri_radius.so
+
+
+%changelog
+* Thu Feb 22 2007 Alfred E. Heggestad <aeh at db.org>
+- Updated for release 2.0.0
+
+* Fri Jul 23 2004 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.14 (new upstream release)
+- added ext to the modules list, removed the radius modules (they depend on radiusclient-ng now)
+
+* Fri Nov 14 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.12 (new upstream release)
+- added auth_diameter, pdt & mangler to the modules list
+
+* Wed Aug 27 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.11
+- gen_ha1 is now left in _sbindir
+- removed harv_ser.sh
+- added xlog to the modules list
+
+* Fri Jun 6 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added Conflicts:, changed vesion to 0.8.11pre30
+
+* Mon Jun 2 2003 Daniel-Constantin Mierla <mierla at fokus.fraunhofer.de>
+- added README files for ser-jabber and ser-radius packages
+- spec file updated to work with rpm v4.1+
+
+* Sun Jun 1 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added a separate rpm for the radius modules
+- updated to the new makefile variables (removed lots of unnecessary stuff)
+
+* Thu Nov 14 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Installing harv_ser.sh again
+- quick hack to move gen_ha1 to bin directory instead of sbin (should
+  be done from the Makefile next time)
+
+* Tue Nov 12 2002 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.gmd.de>
+- added a separate rpm for the jabber modules
+- moved all the binaries to sbin
+- removed obsolete installs (make install installs everything now)
+
+* Fri Oct 25 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Minor description fixes
+
+* Fri Oct  4 2002 Jiri Kuthan <jiri at iptel.org>
+- exec module introduced
+
+* Wed Sep 25 2002 Andrei Pelinescu - Onciul  <pelinescu-onciul at fokus.gmd.de>
+- modified make install & make: added cfg-target & modules-target
+
+* Sun Sep 08 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Created subpackage containing mysql connectivity support.
+
+* Mon Sep 02 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- gen_ha1 utility added, scripts added.
+
+* Tue Aug 28 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Finished the first version of the spec file.
+
+* Sun Aug 12 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- First version of the spec file.
diff --git a/pkg/ser/rpm/ser.spec.fedora b/pkg/ser/rpm/ser.spec.fedora
new file mode 100644
index 0000000..5f362f1
--- /dev/null
+++ b/pkg/ser/rpm/ser.spec.fedora
@@ -0,0 +1,296 @@
+%define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius avp_radius pa postgres snmp cpl cpl-c ext extcmd
+%define MYSQL_MODULES		mysql
+%define JABBER_MODULES		jabber
+%define RADIUS_MODULES		auth_radius group_radius uri_radius avp_radius
+%define CPL_MODULES		cpl-c
+%define PA_MODULES		pa
+%define POSTGRES_MODULES		postgres
+%define ACC_MODULE		acc
+%define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
+
+
+Summary:      SIP Express Router, very fast and flexible SIP Proxy
+Name:         ser
+Version:      0.9.4
+Release:      fc2.0
+Copyright:    GPL
+Group:        System Environment/Daemons
+Source:       http://iptel.org/ser/stable/%{name}-%{version}_src.tar.gz
+Source1:      ser.init
+URL:          http://iptel.org/ser
+Vendor:       FhG Fokus
+BuildRoot:    /var/tmp/%{name}-%{version}-root
+Conflicts:    ser-mysql < %{version}, ser-jabber < %{version}, ser-radius < %{version}
+BuildPrereq:  make flex bison
+
+
+%description
+Ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL support, a presence agent, radius
+authentication, record routing, an SMS gateway, a jabber gateway, a 
+transaction module, registrar and user location.
+
+
+%package  mysql
+Summary:  MySQL connectivity for the SIP Express Router.
+Group:    System Environment/Daemons
+Requires: ser = %{version}
+BuildPrereq:  mysql-devel zlib-devel
+
+
+%description mysql
+The ser-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+
+%package  jabber
+Summary:  sip jabber message translation support for the SIP Express Router.
+Group:    System Environment/Daemons
+Requires: ser = %{version}
+BuildPrereq:  expat-devel
+
+
+%description jabber
+The ser-jabber package contains a sip to jabber message translator.
+
+
+# commented out due to missing libradiusclient-ng
+#%package  radius
+#Summary:  ser radius authentication, group and uri check modules.
+#Group:    System Environment/Daemons
+#Requires: ser = %{version}
+#BuildPrereq:  radiusclient-ng-devel
+
+
+#%description radius
+#The ser-radius package contains modules for radius authentication, group
+# membership and uri checking.
+
+%package  cpl 
+Summary:  CPL support.
+Group:    System Environment/Daemons
+Requires: ser = %{version}
+BuildPrereq:  xml2-devel
+
+%package  pa 
+Summary:  presence server support.
+Group:    System Environment/Daemons
+Requires: ser = %{version}
+BuildPrereq:  xml2-devel
+
+%package  postgres
+Summary:  postgres connectivity for the SIP Express Router.
+Group:    System Environment/Daemons
+Requires: ser = %{version}
+BuildPrereq:  libpq-devel
+
+
+
+%prep
+%setup
+
+
+%build
+make all skip_modules="%EXCLUDED_MODULES"      cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%MYSQL_MODULES"  cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%JABBER_MODULES" cfg-target=/%{_sysconfdir}/ser/
+#make modules modules="%RADIUS_MOD_PATH"        cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%CPL_MODULES"    cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%PA_MODULES"     cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%POSTGRES_MODULES" cfg-target=/%{_sysconfdir}/ser/
+
+
+%install
+rm -rf %{buildroot}
+make install skip_modules="%EXCLUDED_MODULES" \
+		basedir=%{buildroot} \
+		prefix=%{_prefix} \
+		cfg-prefix=%{buildroot} \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules-all modules="modules/%MYSQL_MODULES" \
+		basedir=%{buildroot} \
+		prefix=%{_prefix} \
+		cfg-prefix=%{buildroot} \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules-all modules="modules/%JABBER_MODULES" \
+		basedir=%{buildroot} \
+		prefix=%{_prefix} \
+		cfg-prefix=%{buildroot} \
+		cfg-target=/%{_sysconfdir}/ser/ 
+#make install-modules modules="%RADIUS_MOD_PATH" \
+#		basedir=%{buildroot} \
+#		prefix=%{_prefix} \
+#		cfg-prefix=%{buildroot} \
+#		cfg-target=/%{_sysconfdir}/ser/ 
+#make install-doc modules="%RADIUS_MOD_PATH" \
+#		basedir=%{buildroot} \
+#		prefix=%{_prefix} \
+#		cfg-prefix=%{buildroot} \
+#		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules-all modules="modules/%CPL_MODULES" \
+		basedir=%{buildroot} \
+		prefix=%{_prefix} \
+		cfg-prefix=%{buildroot} \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules-all modules="modules/%PA_MODULES" \
+		basedir=%{buildroot} \
+		prefix=%{_prefix} \
+		cfg-prefix=%{buildroot} \
+		cfg-target=/%{_sysconfdir}/ser/ 
+make install-modules-all modules="modules/%POSTGRES_MODULES" \
+		basedir=%{buildroot} \
+		prefix=%{_prefix} \
+		cfg-prefix=%{buildroot} \
+		cfg-target=/%{_sysconfdir}/ser/ 
+install -m755 -D %{SOURCE1} %{buildroot}/%{_initrddir}/ser
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%post
+/sbin/chkconfig --add ser
+
+
+%preun
+if [ $1 = 0 ]; then
+    /sbin/service ser stop > /dev/null 2>&1
+    /sbin/chkconfig --del ser
+fi
+
+
+%files
+%defattr(-,root,root)
+%doc %{_docdir}/ser/*
+%config(noreplace) %{_sysconfdir}/ser/*
+%config %{_initrddir}/ser
+%{_libdir}/ser/modules/*
+%{_sbindir}/*
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+%exclude %{_libdir}/ser/modules/mysql.so
+%exclude %{_sbindir}/ser_mysql.sh
+%exclude %{_docdir}/ser/README.jabber
+%exclude %{_libdir}/ser/modules/jabber.so
+#%exclude %{_docdir}/ser/README.*_radius
+#%exclude %{_libdir}/ser/modules/*_radius.so
+%exclude %{_docdir}/ser/README.cpl-c
+%exclude %{_libdir}/ser/modules/cpl-c.so
+%exclude %{_docdir}/ser/README.pa
+%exclude %{_libdir}/ser/modules/pa.so
+%exclude %{_docdir}/ser/README.postgres
+%exclude %{_libdir}/ser/modules/postgres.so
+
+
+%files mysql
+%defattr(-,root,root)
+%{_libdir}/ser/modules/mysql.so
+%{_sbindir}/ser_mysql.sh
+
+
+%files jabber
+%defattr(-,root,root)
+%doc %{_docdir}/ser/README.jabber
+%{_libdir}/ser/modules/jabber.so
+
+
+#%files radius
+#%defattr(-,root,root)
+#%doc %{_docdir}/ser/README.*_radius
+#%{_libdir}/ser/modules/*_radius.so
+
+
+%files cpl 
+%defattr(-,root,root)
+%doc %{_docdir}/ser/README.cpl-c
+%{_libdir}/ser/modules/cpl-c.so
+
+
+%files pa 
+%defattr(-,root,root)
+%doc %{_docdir}/ser/README.pa
+%{_libdir}/ser/modules/pa.so
+
+
+%files postgres 
+%defattr(-,root,root)
+%doc %{_docdir}/ser/README.postgres
+%{_libdir}/ser/modules/postgres.so
+
+
+%changelog
+
+* Fri Sep 02 2005 Andrei Pelinescu - Onciul <andrei at iptel.org>
+- changed vesion to 0.9.4 (new upstream release)
+
+* Fri Jun 28 2005 Andrei Pelinescu - Onciul <andrei at iptel.org>
+- changed vesion to 0.9.3 (new upstream release)
+- added cpl, pa and postgres to the modules list
+
+* Tue Nov 23 2004 Gabriel Somlo <somlo at acns.colostate.edu>
+- reworked spec file for fedora core 2
+- replaced absolute paths with macros wherever possible
+- globbed main package filelist
+
+* Fri Jul 23 2004 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.14 (new upstream release)
+- added ext to the modules list, removed the radius modules (they depend on radiusclient-ng now)
+
+* Fri Nov 14 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.12 (new upstream release)
+- added auth_diameter, pdt & mangler to the modules list
+
+* Wed Aug 27 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.11
+- gen_ha1 is now left in _sbindir
+- removed harv_ser.sh
+- added xlog to the modules list
+
+* Fri Jun 6 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added Conflicts:, changed vesion to 0.8.11pre30
+
+* Mon Jun 2 2003 Daniel-Constantin Mierla <mierla at fokus.fraunhofer.de>
+- added README files for ser-jabber and ser-radius packages
+- spec file updated to work with rpm v4.1+
+
+* Sun Jun 1 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added a separate rpm for the radius modules
+- updated to the new makefile variables (removed lots of unnecessary stuff)
+
+* Thu Nov 14 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Installing harv_ser.sh again
+- quick hack to move gen_ha1 to bin directory instead of sbin (should
+  be done from the Makefile next time)
+
+* Tue Nov 12 2002 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.gmd.de>
+- added a separate rpm for the jabber modules
+- moved all the binaries to sbin
+- removed obsolete installs (make install installs everything now)
+
+* Fri Oct 25 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Minor description fixes
+
+* Fri Oct  4 2002 Jiri Kuthan <jiri at iptel.org>
+- exec module introduced
+
+* Wed Sep 25 2002 Andrei Pelinescu - Onciul  <pelinescu-onciul at fokus.gmd.de>
+- modified make install & make: added cfg-target & modules-target
+
+* Sun Sep 08 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Created subpackage containing mysql connectivity support.
+
+* Mon Sep 02 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- gen_ha1 utility added, scripts added.
+
+* Tue Aug 28 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Finished the first version of the spec file.
+
+* Sun Aug 12 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- First version of the spec file.
diff --git a/pkg/ser/solaris/pkginfo b/pkg/ser/solaris/pkginfo
new file mode 100644
index 0000000..041b71f
--- /dev/null
+++ b/pkg/ser/solaris/pkginfo
@@ -0,0 +1,9 @@
+PKG=IPTELser
+ARCH=sparc
+VERSION=0.9.4
+CATEGORY=application
+EMAIL=andrei at iptel.org
+NAME= ser or SIP Express Router is a very fast and flexible SIP proxy server
+SUNW_ISA=sparcv9
+BASEDIR=/usr/local
+CLASSES=none
diff --git a/pkg/ser/solaris/prototype b/pkg/ser/solaris/prototype
new file mode 100644
index 0000000..48879fb
--- /dev/null
+++ b/pkg/ser/solaris/prototype
@@ -0,0 +1,106 @@
+# $Id$
+i pkginfo=pkginfo
+d none etc 0755 bin bin
+d none etc/ser 0755 bin bin
+e none etc/ser/dictionary.ser 0644 bin bin
+e none etc/ser/ser.cfg 0644 bin bin
+d none sbin 0755 bin bin
+f none sbin/ser 0755 bin bin
+f none sbin/ser_mysql.sh 0755 bin bin
+f none sbin/serctl 0755 bin bin
+f none sbin/serunix 0755 bin bin
+d none lib 0755 bin bin
+d none lib/ser 2755 bin bin
+d none lib/ser/modules 2755 bin bin
+f none lib/ser/modules/acc.so 0755 bin bin
+f none lib/ser/modules/auth.so 0755 bin bin
+f none lib/ser/modules/auth_db.so 0755 bin bin
+f none lib/ser/modules/auth_diameter.so 0755 bin bin
+f none lib/ser/modules/avp.so 0755 bin bin
+f none lib/ser/modules/avp_db.so 0755 bin bin
+f none lib/ser/modules/avpops.so 0755 bin bin
+f none lib/ser/modules/cpl-c.so 0755 bin bin
+f none lib/ser/modules/dbtext.so 0755 bin bin
+f none lib/ser/modules/dispatcher.so 0755 bin bin
+f none lib/ser/modules/diversion.so 0755 bin bin
+f none lib/ser/modules/domain.so 0755 bin bin
+f none lib/ser/modules/enum.so 0755 bin bin
+f none lib/ser/modules/exec.so 0755 bin bin
+f none lib/ser/modules/flatstore.so 0755 bin bin
+f none lib/ser/modules/gflags.so 0755 bin bin
+f none lib/ser/modules/group.so 0755 bin bin
+f none lib/ser/modules/jabber.so 0755 bin bin
+f none lib/ser/modules/mangler.so 0755 bin bin
+f none lib/ser/modules/maxfwd.so 0755 bin bin
+f none lib/ser/modules/mediaproxy.so 0755 bin bin
+f none lib/ser/modules/msilo.so 0755 bin bin
+f none lib/ser/modules/mysql.so 0755 bin bin
+f none lib/ser/modules/nathelper.so 0755 bin bin
+f none lib/ser/modules/options.so 0755 bin bin
+f none lib/ser/modules/pa.so 0755 bin bin
+f none lib/ser/modules/pdt.so 0755 bin bin
+f none lib/ser/modules/permissions.so 0755 bin bin
+f none lib/ser/modules/pike.so 0755 bin bin
+f none lib/ser/modules/print.so 0755 bin bin
+f none lib/ser/modules/registrar.so 0755 bin bin
+f none lib/ser/modules/rr.so 0755 bin bin
+f none lib/ser/modules/sl.so 0755 bin bin
+f none lib/ser/modules/sms.so 0755 bin bin
+f none lib/ser/modules/speeddial.so 0755 bin bin
+f none lib/ser/modules/textops.so 0755 bin bin
+f none lib/ser/modules/tm.so 0755 bin bin
+f none lib/ser/modules/uri.so 0755 bin bin
+f none lib/ser/modules/uri_db.so 0755 bin bin
+f none lib/ser/modules/usrloc.so 0755 bin bin
+f none lib/ser/modules/xlog.so 0755 bin bin
+d none doc 0755 bin bin
+d none doc/ser 0755 bin bin
+f none doc/ser/README 0644 bin bin
+f none doc/ser/INSTALL 0644 bin bin
+f none doc/ser/README-MODULES 0644 bin bin
+f none doc/ser/AUTHORS 0644 bin bin
+f none doc/ser/NEWS    0644 bin bin
+f none doc/ser/README.acc 0644 bin bin
+f none doc/ser/README.auth 0644 bin bin
+f none doc/ser/README.auth_db 0644 bin bin
+f none doc/ser/README.auth_diameter 0644 bin bin
+f none doc/ser/README.avp 0644 bin bin
+f none doc/ser/README.avp_db 0644 bin bin
+f none doc/ser/README.avpops 0644 bin bin
+f none doc/ser/README.cpl-c 0644 bin bin
+f none doc/ser/README.dbtext  0644 bin bin
+f none doc/ser/README.dispatcher  0644 bin bin
+f none doc/ser/README.diversion  0644 bin bin
+f none doc/ser/README.domain  0644 bin bin
+f none doc/ser/README.enum    0644 bin bin
+f none doc/ser/README.exec 0644 bin bin
+f none doc/ser/README.flatstore 0644 bin bin
+f none doc/ser/README.gflags 0644 bin bin
+f none doc/ser/README.group 0644 bin bin
+f none doc/ser/README.jabber 0644 bin bin
+f none doc/ser/README.mangler 0644 bin bin
+f none doc/ser/README.maxfwd 0644 bin bin
+f none doc/ser/README.msilo 0644 bin bin
+f none doc/ser/README.nathelper 0644 bin bin
+f none doc/ser/README.options 0644 bin bin
+f none doc/ser/README.pa 0644 bin bin
+f none doc/ser/README.pdt 0644 bin bin
+f none doc/ser/README.permissions 0644 bin bin
+f none doc/ser/README.pike 0644 bin bin
+f none doc/ser/README.print 0644 bin bin
+f none doc/ser/README.registrar 0644 bin bin
+f none doc/ser/README.rr 0644 bin bin
+f none doc/ser/README.sl 0644 bin bin
+f none doc/ser/README.sms 0644 bin bin
+f none doc/ser/README.speeddial 0644 bin bin
+f none doc/ser/README.textops 0644 bin bin
+f none doc/ser/README.tm 0644 bin bin
+f none doc/ser/README.uri 0644 bin bin
+f none doc/ser/README.uri_db 0644 bin bin
+f none doc/ser/README.usrloc 0644 bin bin
+f none doc/ser/README.xlog 0644 bin bin
+d none man 0755 bin bin
+d none man/man8 0755 bin bin
+f none man/man8/ser.8 0644 bin bin
+d none man/man5 0755 bin bin
+f none man/man5/ser.cfg.5 0644 bin bin
diff --git a/pkg/ser/suse/ser.init b/pkg/ser/suse/ser.init
new file mode 100755
index 0000000..ccafea2
--- /dev/null
+++ b/pkg/ser/suse/ser.init
@@ -0,0 +1,136 @@
+#! /bin/sh
+# Copyright (c) 2002 Frauenhofer Gesellschaft FOKUS, Germany.
+# All rights reserved.
+#
+# Author: Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+#
+# /etc/init.d/ser
+#
+### BEGIN INIT INFO
+# Provides:          sip
+# Required-Start:    $network
+# X-UnitedLinux-Should-Start: $network
+# Required-Stop:     $network
+# X-UnitedLinux-Should-Stop: $network
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: SIP Express Router
+# Description:       Start SER and provide the routing of SIP requests.
+### END INIT INFO
+
+
+# Check for missing binaries (stale symlinks should not happen)
+SER_BIN=/usr/sbin/ser
+test -x $SER_BIN || exit 5
+
+# Check for existence of needed config file and read it
+SER_CONFIG=/etc/ser/ser.cfg
+test -r $SER_CONFIG || exit 6
+#. $FOO_CONFIG
+
+# Shell functions sourced from /etc/rc.status:
+#      rc_check         check and set local and overall rc status
+#      rc_status        check and set local and overall rc status
+#      rc_status -v     ditto but be verbose in local rc status
+#      rc_status -v -r  ditto and clear the local rc status
+#      rc_status -s     display "skipped" and exit with status 3
+#      rc_status -u     display "unused" and exit with status 3
+#      rc_failed        set local and overall rc status to failed
+#      rc_failed <num>  set local and overall rc status to <num>
+#      rc_reset         clear local rc status (overall remains)
+#      rc_exit          exit appropriate to overall rc status
+#      rc_active	checks whether a service is activated by symlinks
+#      rc_splash arg    sets the boot splash screen to arg (if active)
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0	  - success
+# 1       - generic or unspecified error
+# 2       - invalid or excess argument(s)
+# 3       - unimplemented feature (e.g. "reload")
+# 4       - user had insufficient privileges
+# 5       - program is not installed
+# 6       - program is not configured
+# 7       - program is not running
+# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+# 
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+case "$1" in
+    start)
+	echo -n "Starting SIP Express Router "
+	## Start daemon with startproc(8). If this fails
+	## the return value is set appropriately by startproc.
+	startproc $SER_BIN -f $SER_CONFIG
+
+	# Remember status and be verbose
+	rc_status -v
+	;;
+    stop)
+	echo -n "Shutting down SIP Express Router "
+	## Stop daemon with killproc(8) and if this fails
+	## killproc sets the return value according to LSB.
+
+	killproc -TERM $SER_BIN
+
+	# Remember status and be verbose
+	rc_status -v
+	;;
+    restart)
+	## Stop the service and regardless of whether it was
+	## running or not, start it again.
+	$0 stop
+	$0 start
+
+	# Remember status and be quiet
+	rc_status
+	;;
+    force-reload)
+	## Signal the daemon to reload its config. Most daemons
+	## do this on signal 1 (SIGHUP).
+	## If it does not support it, restart.
+
+	echo -n "Reload service SIP Express Router "
+	## Otherwise:
+	$0 stop  &&  $0 start
+	rc_status
+	;;
+    reload)
+	## Like force-reload, but if daemon does not support
+	## signaling, do nothing (!)
+
+	## Otherwise if it does not support reload:
+	rc_failed 3
+	rc_status -v
+	;;
+    status)
+	echo -n "Checking for service SIP Express Router "
+	## Check status with checkproc(8), if process is running
+	## checkproc will return with exit status 0.
+
+	# Return value is slightly different for the status command:
+	# 0 - service up and running
+	# 1 - service dead, but /var/run/  pid  file exists
+	# 2 - service dead, but /var/lock/ lock file exists
+	# 3 - service not running (unused)
+	# 4 - service status unknown :-(
+	# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
+	
+	# NOTE: checkproc returns LSB compliant status values.
+	checkproc $SER_BIN
+	# NOTE: rc_status knows that we called this init script with
+	# "status" option and adapts its messages accordingly.
+	rc_status -v
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|restart}"
+	exit 1
+	;;
+esac
+rc_exit
diff --git a/pkg/ser/suse/ser.spec b/pkg/ser/suse/ser.spec
new file mode 100644
index 0000000..1dfd7ab
--- /dev/null
+++ b/pkg/ser/suse/ser.spec
@@ -0,0 +1,341 @@
+%define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius postgres snmp cpl cpl-c extcmd 
+%define MYSQL_MODULES		mysql
+%define JABBER_MODULES		jabber
+%define RADIUS_MODULES		auth_radius group_radius uri_radius
+%define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
+
+%define distroversion generic
+%{!?suse_version:%define suse_version 0}
+%{!?sles_version:%define sles_version 0}
+%if %suse_version > 0
+	%define distroversion	suse%{suse_version}
+%endif
+%if %sles_version > 0
+	%define distroversion	sles%{sles_version}
+%endif
+
+
+Summary:      SIP Express Router, very fast and flexible SIP Proxy
+Name:         ser
+Version:      0.9.3
+Release:      0.%{distroversion}
+Packager:     Nils Ohlmeier <nils at iptel.org>
+Copyright:    GPL
+Group:        Productivity/Telephony/SIP/Servers
+Source:       http://iptel.org/ser/stable/%{name}-%{version}_src.tar.gz
+Source2:      ser.init.SuSE
+URL:          http://www.iptel.org/ser
+Vendor:       FhG Fokus
+BuildRoot:    /var/tmp/%{name}-%{ver}-root
+Conflicts:    ser < %{version}, ser-mysql < %{version}, ser-jabber < %{version}, ser-radius < %{version}
+BuildPrereq:  make flex bison 
+
+%description
+Ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, ser can handle thousands calls
+per second even on low-budget hardware. A C Shell like scripting language
+provides full control over the server's behaviour. It's modular
+architecture allows only required functionality to be loaded.
+Currently the following modules are available: digest authentication,
+CPL scripts, instant messaging, MySQL support, a presence agent, radius
+authentication, record routing, an SMS Gateway, a jabber gateway, a 
+transaction module, registrar and user location.
+
+%package  mysql
+Summary:  MySQL connectivity for the SIP Express Router.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq: mysql-devel zlib-devel
+
+%description mysql
+The ser-mysql package contains MySQL database connectivity that you
+need to use digest authentication module or persistent user location
+entries.
+
+%package  jabber
+Summary:  sip jabber message translation support for the SIP Express Router.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq: expat
+
+%description jabber
+The ser-jabber package contains a sip to jabber message translator.
+
+%package  radius
+Summary:  ser radius authentication, group and uri check modules.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq:  radiusclient
+
+%description radius
+The ser-radius package contains modules for radius authentication, group
+ membership and uri checking.
+
+%prep
+%setup
+
+%build
+make all skip_modules="%EXCLUDED_MODULES"      cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%MYSQL_MODULES"  cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%JABBER_MODULES" cfg-target=/%{_sysconfdir}/ser/
+make modules modules="%RADIUS_MOD_PATH"        cfg-target=/%{_sysconfdir}/ser/
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install skip_modules="%EXCLUDED_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="%RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-doc modules="modules/%JABBER_MODULES %RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
+install -m755 $RPM_SOURCE_DIR/ser.init.SuSE \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ser
+ln -sf ../../etc/init.d/ser $RPM_BUILD_ROOT/usr/sbin/rcser
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%post
+sbin/insserv etc/init.d/ser
+
+%preun
+if [ $1 = 0 ]; then
+    etc/init.d/ser stop > /dev/null 2>&1
+fi
+
+%postun
+sbin/insserv etc/init.d/
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/ser
+%doc %{_docdir}/ser/AUTHORS
+%doc %{_docdir}/ser/NEWS
+%doc %{_docdir}/ser/INSTALL
+%doc %{_docdir}/ser/README
+%doc %{_docdir}/ser/README-MODULES
+%doc %{_docdir}/ser/README.acc
+%doc %{_docdir}/ser/README.auth
+%doc %{_docdir}/ser/README.auth_db
+%doc %{_docdir}/ser/README.auth_diameter
+%doc %{_docdir}/ser/README.avp
+%doc %{_docdir}/ser/README.avp_db
+%doc %{_docdir}/ser/README.avpops
+%doc %{_docdir}/ser/README.dbtext
+%doc %{_docdir}/ser/README.dispatcher
+%doc %{_docdir}/ser/README.diversion
+%doc %{_docdir}/ser/README.domain
+%doc %{_docdir}/ser/README.enum
+%doc %{_docdir}/ser/README.exec
+%doc %{_docdir}/ser/README.flatstore
+%doc %{_docdir}/ser/README.gflags
+%doc %{_docdir}/ser/README.group
+%doc %{_docdir}/ser/README.mangler
+%doc %{_docdir}/ser/README.maxfwd
+%doc %{_docdir}/ser/README.msilo
+%doc %{_docdir}/ser/README.nathelper
+%doc %{_docdir}/ser/README.options
+%doc %{_docdir}/ser/README.pdt
+%doc %{_docdir}/ser/README.permissions
+%doc %{_docdir}/ser/README.pike
+%doc %{_docdir}/ser/README.print
+%doc %{_docdir}/ser/README.registrar
+%doc %{_docdir}/ser/README.rr
+%doc %{_docdir}/ser/README.sl
+%doc %{_docdir}/ser/README.sms
+%doc %{_docdir}/ser/README.speeddial
+%doc %{_docdir}/ser/README.textops
+%doc %{_docdir}/ser/README.tm
+%doc %{_docdir}/ser/README.uri
+%doc %{_docdir}/ser/README.uri_db
+%doc %{_docdir}/ser/README.usrloc
+%doc %{_docdir}/ser/README.xlog
+
+%dir %{_sysconfdir}/ser
+%config(noreplace) %{_sysconfdir}/ser/*
+%config %{_sysconfdir}/init.d/*
+
+%dir %{_libdir}/ser
+%dir %{_libdir}/ser/modules
+%{_libdir}/ser/modules/acc.so
+%{_libdir}/ser/modules/auth.so
+%{_libdir}/ser/modules/auth_db.so
+%{_libdir}/ser/modules/auth_diameter.so
+%{_libdir}/ser/modules/dbtext.so
+%{_libdir}/ser/modules/domain.so
+%{_libdir}/ser/modules/enum.so
+%{_libdir}/ser/modules/exec.so
+%{_libdir}/ser/modules/group.so
+%{_libdir}/ser/modules/mangler.so
+%{_libdir}/ser/modules/maxfwd.so
+%{_libdir}/ser/modules/mediaproxy.so
+%{_libdir}/ser/modules/msilo.so
+%{_libdir}/ser/modules/nathelper.so
+%{_libdir}/ser/modules/pdt.so
+%{_libdir}/ser/modules/permissions.so
+%{_libdir}/ser/modules/pike.so
+%{_libdir}/ser/modules/print.so
+%{_libdir}/ser/modules/registrar.so
+%{_libdir}/ser/modules/rr.so
+%{_libdir}/ser/modules/sl.so
+%{_libdir}/ser/modules/sms.so
+%{_libdir}/ser/modules/textops.so
+%{_libdir}/ser/modules/tm.so
+%{_libdir}/ser/modules/uri.so
+%{_libdir}/ser/modules/usrloc.so
+%{_libdir}/ser/modules/xlog.so
+
+%{_libdir}/ser/modules/avp.so
+%{_libdir}/ser/modules/avp_db.so
+%{_libdir}/ser/modules/avpops.so
+%{_libdir}/ser/modules/dispatcher.so
+%{_libdir}/ser/modules/diversion.so
+%{_libdir}/ser/modules/flatstore.so
+%{_libdir}/ser/modules/gflags.so
+%{_libdir}/ser/modules/options.so
+%{_libdir}/ser/modules/speeddial.so
+%{_libdir}/ser/modules/uri_db.so
+
+%{_sbindir}/ser
+%{_sbindir}/serctl
+%{_sbindir}/serunix
+/usr/sbin/rcser
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+
+%files mysql
+%defattr(-,root,root)
+
+%{_libdir}/ser/modules/mysql.so
+%{_sbindir}/ser_mysql.sh
+
+%files jabber
+%defattr(-,root,root)
+%{_libdir}/ser/modules/jabber.so
+%doc %{_docdir}/ser/README.jabber
+
+%files radius
+%defattr(-,root,root)
+#%{_libdir}/ser/modules/auth_radius.so
+#%{_libdir}/ser/modules/group_radius.so
+#%{_libdir}/ser/modules/uri_radius.so
+%doc %{_docdir}/ser/README.auth_radius
+%doc %{_docdir}/ser/README.group_radius
+%doc %{_docdir}/ser/README.uri_radius
+
+
+
+
+%changelog
+
+* Fri Aug 26 2005 Peter Nixon - Suntel Communications <peter+rpmspam at suntel.com.tr>
+- Remove some needless junk
+- Add a generic tag for non SUSE versions of linux so build doesnt fail on them
+
+* Tue Jul 26 2005 Peter Nixon - Suntel Communications <peter+rpmspam at suntel.com.tr>
+- changed version to 0.9.3 (new upstream release)
+- include SUSE version in the rpm filename(s)
+- update rpm package group to match SUSE 9.3
+- removed files no longer in tarball
+- enabled radius module
+- add symlink for rcser
+
+* Tue Jul 27 2004 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.14 (new upstream release)
+- added ext to the modules list, removed the radius modules (they depend on radiusclient-ng now)
+
+* Fri Nov 14 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.12 (new upstream release)
+- added auth_diameter, pdt & mangler to the modules list
+
+* Wed Aug 28 2003 Nils Ohlmeier <nils at iptel.org>
+- replaced modules Conflicts with required Ser version
+- fixed doc installation for SuSE pathes
+- added doc for jabber and radius
+
+* Wed Aug 28 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added doc (READMEs, NEWS, AUTHORS a.s.o)
+- added xlog to the modules list
+
+* Wed Aug 27 2003 Nils Ohlmeier <nils at iptel.org>
+- fixed module dependencys
+- added Conflicts for modules
+
+* Wed Aug 27 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- changed vesion to 0.8.11
+- gen_ha1 is now left in _sbindir
+- removed harv_ser.sh
+- added Conflicts
+
+* Mon Jun 2 2003 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.fraunhofer.de>
+- added a separate rpm for the radius modules
+- updated to the new makefile variables (removed lots of unnecessary stuff)
+
+* Tue Nov 12 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- replaced expat-devel with expat
+- removed leading + from a few lines
+
+* Tue Nov 12 2002 Andrei Pelinescu - Onciul <pelinescu-onciul at fokus.gmd.de>
+- added a separate rpm for the jabber modules
+- moved all the binaries to sbin
+- removed obsolete installs (make install installs everything now)
+
+* Mon Oct 28 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Added mysql and mysql-devel to the Req for the ser-mysql rpm.
+
+* Thu Sep 26 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Added library path to mysql/Makefile to build on SuSE 8.0
+
+* Thu Sep 26 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Added 'make [modules|modules-install]' to adapted Makefile changes
+
+* Wed Sep 25 2002 Andrei Pelinescu - Onciul  <pelinescu-onciul at fokus.gmd.de>
+- modified make install & make: added cfg-target & modules-target
+
+* Wed Sep 25 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Copyed mysql connectivity subpackage from orig rpm.spec.
+
+* Fri Sep 06 2002 Nils Ohlmeier <ohlmeier at fokus.fhg.de>
+- Adaptation to SuSE.
+
+* Mon Sep 02 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- gen_ha1 utility added, scripts added.
+
+* Tue Aug 28 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- Finished the first version of the spec file.
+
+* Sun Aug 12 2002 Jan Janak <J.Janak at sh.cvut.cz>
+- First version of the spec file.
diff --git a/route.c b/route.c
index 1c5897c..2a3e1b9 100644
--- a/route.c
+++ b/route.c
@@ -1886,8 +1886,7 @@ inline static int eval_elem(struct run_act_ctx* h, struct expr* e,
 			if (e->r_type==MYSELF_ST){
 				if (parse_sip_msg_uri(msg)<0) ret=-1;
 				else ret=check_self_op(e->op, &msg->parsed_uri.host,
-						       msg->parsed_uri.port_no?
-						       msg->parsed_uri.port_no:SIP_PORT);
+								GET_URI_PORT(&msg->parsed_uri));
 			}else{
 				ret=comp_str(e->op, &msg->new_uri,
 								e->r_type, &e->r, msg, h);
@@ -1896,8 +1895,7 @@ inline static int eval_elem(struct run_act_ctx* h, struct expr* e,
 			if (e->r_type==MYSELF_ST){
 				if (parse_sip_msg_uri(msg)<0) ret=-1;
 				else ret=check_self_op(e->op, &msg->parsed_uri.host,
-						       msg->parsed_uri.port_no?
-						       msg->parsed_uri.port_no:SIP_PORT);
+								GET_URI_PORT(&msg->parsed_uri));
 			}else{
 				ret=comp_str(e->op, &msg->first_line.u.request.uri,
 								e->r_type, &e->r, msg, h);
@@ -1917,8 +1915,7 @@ inline static int eval_elem(struct run_act_ctx* h, struct expr* e,
 				LOG(L_ERR, "ERROR: eval_elem: bad uri in From:\n");
 				goto error;
 			}
-			ret=check_self_op(e->op, &uri.host,
-					  uri.port_no?uri.port_no:SIP_PORT);
+			ret=check_self_op(e->op, &uri.host, GET_URI_PORT(&uri));
 		}else{
 			ret=comp_str(e->op, &get_from(msg)->uri,
 							e->r_type, &e->r, msg, h);
@@ -1939,8 +1936,7 @@ inline static int eval_elem(struct run_act_ctx* h, struct expr* e,
 				LOG(L_ERR, "ERROR: eval_elem: bad uri in To:\n");
 				goto error;
 			}
-			ret=check_self_op(e->op, &uri.host,
-					  uri.port_no?uri.port_no:SIP_PORT);
+			ret=check_self_op(e->op, &uri.host, GET_URI_PORT(&uri));
 		}else{
 			ret=comp_str(e->op, &get_to(msg)->uri,
 							e->r_type, &e->r, msg, h);
diff --git a/rpc_lookup.h b/rpc_lookup.h
index 7988e04..53d40b6 100644
--- a/rpc_lookup.h
+++ b/rpc_lookup.h
@@ -33,7 +33,7 @@ extern rpc_export_t** rpc_sarray;
 extern int rpc_sarray_crt_size;
 
 int init_rpcs(void);
-int destroy_rpcs(void);
+void destroy_rpcs(void);
 
 rpc_export_t* rpc_lookup(const char* name, int len);
 int rpc_register(rpc_export_t* rpc);
diff --git a/rvalue.c b/rvalue.c
index ddc97c2..8e5ba20 100644
--- a/rvalue.c
+++ b/rvalue.c
@@ -2554,6 +2554,7 @@ struct rval_expr* mk_rval_expr_v(enum rval_type rv_type, void* val,
 			s=(str*)val;
 			v.s.s=pkg_malloc(s->len+1 /*0*/);
 			if (v.s.s==0){
+				pkg_free(rve);
 				ERR("memory allocation failure\n");
 				return 0;
 			}
diff --git a/tcp_main.c b/tcp_main.c
index 701f90f..5a43d2c 100644
--- a/tcp_main.c
+++ b/tcp_main.c
@@ -4934,6 +4934,17 @@ int tcp_init_children()
 			}
 		}
 	}
+#ifdef USE_TLS
+	for(si=tls_listen; si; si=si->next) {
+		if(si->workers>0) {
+			si->workers_tcpidx = i - si->workers + 1;
+			for(r=0; r<si->workers; r++) {
+				tcp_children[i].mysocket = si;
+				i--;
+			}
+		}
+	}
+#endif
 	tcp_sockets_gworkers = (i != tcp_children_no-1)?(1 + i + 1):0;
 
 	/* create the tcp sock_info structures */
diff --git a/utils/sercmd/sercmd.c b/utils/sercmd/sercmd.c
index 00f10e7..fb9c0a3 100644
--- a/utils/sercmd/sercmd.c
+++ b/utils/sercmd/sercmd.c
@@ -1499,7 +1499,7 @@ static int get_mi_list(int s)
 	/* alloc the mi_cmds array */
 	mi_cmds=malloc(mi_which_results*sizeof(*mi_cmds));
 	if (mi_cmds==0) goto error_mem;
-	memset(mi_cmds, 0, mi_which_results* sizeof(mi_cmds));
+	memset(mi_cmds, 0, mi_which_results* sizeof(*mi_cmds));
 	/* get the mi names list */
 	for (r=0; r<mi_which_no; r++){
 		if (mi_which_array[r].type!=BINRPC_T_STR)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/kamailio.git



More information about the Pkg-voip-commits mailing list