[package] add asterisk-chan-sscp-b

This adds chan-sccp-b support to Asterisk 1.8.x.

Chan_SCCP is a replacement Channel Driver for chan_skinny in the Asterisk Channel
Driver Library. It delivers better performance, scalability, interoperability and
functionality than either chan_skinny or chan_sip on a SCCP capable phone.

See: http://chan-sccp-b.sourceforge.net

Signed-off-by: Diederik de Groot <dkgroot@talon.nl>
Signed-off-by: Hans Zandbelt <hans.zandbelt@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28374 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2011-10-06 16:17:32 +00:00
parent f3de607295
commit 267fb531bc
3 changed files with 176 additions and 0 deletions

View File

@ -0,0 +1,68 @@
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-chan-sccp-b
# associated with asterisk version
PKG_VERSION:=1.8.4.4
# chan-sccp-b version
PKG_RELEASE:=V4.0.0
# SVN
PKG_REV=2797
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://chan-sccp-b.svn.sourceforge.net/svnroot/chan-sccp-b/trunk
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=svn
PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
define Package/asterisk18-chan-sccp-b
SUBMENU:=Telephony
SECTION:=net
CATEGORY:=Network
TITLE:=SCCP channel provider for asterisk
URL:=http://chan-sccp-b.net.sourceforge.net/
MAINTAINER:=Diederik de Groot <ddegroot@users.sourceforge.net>
DEPENDS:=+asterisk18
endef
define Package/asterisk18-chan-sccp-b/description
SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered
by asterisk by default.
endef
define Build/Configure
(cd $(PKG_BUILD_DIR); \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--prefix=/usr \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--with-asterisk="$(PKG_BUILD_DIR)/../asterisk-${PKG_VERSION}/" \
);
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
mkdir -p $(PKG_INSTALL_DIR)/usr/lib/modules/asterisk
mkdir -p $(PKG_INSTALL_DIR)/etc/astisk
endef
define Package/asterisk18-chan-sccp-b/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_BIN) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(CP) $(PKG_BUILD_DIR)/src/.libs/chan_sccp.so $(1)/usr/lib/asterisk/modules/
endef
$(eval $(call BuildPackage,asterisk18-chan-sccp-b))

View File

@ -0,0 +1,89 @@
[general]
servername = Openwrt
keepalive = 60
debug = core
context = default
dateformat = D/M/Y
bindaddr = 192.168.1.1
port = 2000
disallow=all
allow=ulaw
allow=alaw
allow=gsm
firstdigittimeout = 16
digittimeout = 6
autoanswer_ring_time = 1
musicclass=default
language=en
deny=0.0.0.0/0.0.0.0
permit=192.168.1.0/255.255.255.0
protocolversion=17
hotline_enabled=yes
hotline_context=default
hotline_extension=111
[SEP001122334455]
type = device
description = Phone Number One
devicetype = 7940
button = line, 111
button = line, 113@01:shared
button = speeddial,Phone 2 Line 1, 112, 112@hint
[SEP00a1a2a3a4a5]
type = device
description = Phone Number Two
devicetype = 7960
button = line, 112
button = line, 113@01:shared
button = speeddial,Phone 1 Line 1, 111, 111@hint
[111]
id = 1000
type = line
pin = 1234
label = Phone 1 Line 1
description = Line 111
mailbox = 10111
cid_name = Phone 1 CID
cid_num = 111
accountcode=79111
callgroup=1
pickupgroup=1
context = default
incominglimit = 2
vmnum = 600
trnsfvm = 1000
[112]
id = 1001
type = line
pin = 1234
label = Phone 2 Line 1
description = Line 112
mailbox = 10112
cid_name = Phone 2 CID
cid_num = 112
accountcode=79112
callgroup=1
pickupgroup=1
context = default
incominglimit = 2
vmnum = 600
trnsfvm = 1000
[113]
id = 1002
type = line
pin = 1234
label = SharedLine 1
description = Line 113
mailbox = 10113
cid_name = Shared
cid_num = 113
accountcode=79113
incominglimit = 2
vmnum = 600
trnsfvm = 1000

View File

@ -0,0 +1,19 @@
--- a/src/chan_sccp.h
+++ b/src/chan_sccp.h
@@ -172,15 +172,7 @@
# define CHECK_LEAKS()
# endif
-# define SCCP_FILE_VERSION(file, version) \
- static void __attribute__((constructor)) __register_file_version(void) \
- { \
- pbx_register_file_version(file, version); \
- } \
- static void __attribute__((destructor)) __unregister_file_version(void) \
- { \
- pbx_unregister_file_version(file); \
- }
+# define SCCP_FILE_VERSION(file, version)
# define DEV_ID_LOG(x) x ? x->id : "SCCP"