Contributed Modules. How-to

Hi,

I am developing a new module to administer Cisco IP Phones (SCCP) in FreePBX.
How can I get SVN write access to that branch ?

Are you modifying the one someone wrote several years ago or starting from scratch?

I need to check with Tony but I am not sure if the contributed modules are handled via the svn.

Certainly we would love to see your efforts, do you have a beta version we could post so some folks can give you feedback?

I have also been an advocate of building an RPM for chan_sccp. This would give us a reason. What version of chan_sccp are you writing for?

I installed and tried the old one, but it was not useful for my purposes so I started a new one from scratch. The module is written for the new chan_sccp v.4.0, and I think it can be very useful to people who want to migrate from CUCM to Asterisk.

About SVN, is your proposed method (http://www.freepbx.org/freepbx-development).

I’ll be glad to send you the module (via email?), and get feedback (really needed).

i’d like to contribute a module for dealing with DPMA-controlled digium phones. I know what needs to be done for the configuration files (at least i THINK i do); is the best place to start the development wiki??

melenoski, jm52,

I’ve added you to the contributed_modules svn repo. Just use this same username and password for the site, it’s all tied together.

jm52,

you should maybe chat with Tony briefly on the DMPA stuff you want to do, I think he has been doing some stuff on that and it would be worth syncing up before diving in.

Hi,

Finally I’ve uploaded the module as a new “Module Submission” Ticket:

http://www.freepbx.org/trac/ticket/5919

Best regards,

Javier.

Please wait while module actions are performed
FATAL ERROR
Can not modify sccpline table
Trace Back

/var/www/html/admin/modules/sccp_manager/install.php:42 die_freepbx()
[0]: Can not modify sccpline table

/var/www/html/admin/libraries/module.functions.php:1581 include_once()
[0]: /var/www/html/admin/modules/sccp_manager/install.php

/var/www/html/admin/libraries/module.functions.php:1548 _modules_doinclude()
[0]: /var/www/html/admin/modules/sccp_manager/install.php
[1]: sccp_manager

/var/www/html/admin/libraries/module.functions.php:1157 _module_runscripts()
[0]: sccp_manager
[1]: install
[2]:

/var/www/html/admin/page.modules.php:397 module_install()
[0]: sccp_manager

/var/www/html/admin/config.php:306 include()
[0]: /var/www/html/admin/page.modules.php

MBR89 - Did you read the release notes:

<?php

global $db;

$autoincrement = (($amp_conf[“AMPDBENGINE”] == “sqlite”) || ($amp_conf[“AMPDBENGINE”] == “sqlite3”) || ($amp_conf[“AMPDBENGINE”] == “mysql”)) ? “AUTOINCREMENT”:“AUTO_INCREMENT”;

$sql = “CREATE TABLE IF NOT EXISTS sccpdevmodel (
id int(2) NOT NULL AUTO_INCREMENT,
model varchar(20) NOT NULL DEFAULT ‘’,
vendor varchar(40) DEFAULT ‘’,
dns int(2) DEFAULT ‘1’,
buttons int(2) DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1
”;

$check = $db->query($sql);
if(DB::IsError($check)) {
die_freepbx(“Can not create sccpdevmodel table\n”);
}

$sql = “INSERT IGNORE INTO sccpdevmodel VALUES (1,‘790X’,‘CISCO’,1,0),(2,‘791X’,‘CISCO’,1,0),(3,‘792X’,‘CISCO’,1,0),(4,‘793X’,‘CISCO’,1,0),(5,‘794X’,‘CISCO’,2,2),(6,‘796X’,‘CISCO’,2,6),(7,‘797X’,‘CISCO’,2,6),(8,‘IP Communicator’,‘CISCO’,2,8)
”;

$check = $db->query($sql);
if(DB::IsError($check)) {
die_freepbx(“Can not insert into sccpdevmodel table\n”);
}

$sql = “ALTER TABLE sccpline
ALTER COLUMN incominglimit SET DEFAULT ‘2’,
ALTER COLUMN transfer SET DEFAULT ‘on’,
ALTER COLUMN vmnum SET DEFAULT ‘*97’,
ALTER COLUMN musicclass SET DEFAULT ‘default’,
ALTER COLUMN echocancel SET DEFAULT ‘on’,
ALTER COLUMN silencesuppression SET DEFAULT ‘off’,
ALTER COLUMN dnd SET DEFAULT ‘on’
” ;

$check = $db->query($sql);
if(DB::IsError($check)) {
die_freepbx(“Can not modify sccpline table\n”);
}

$sql = "ALTER TABLE sccpdevice

   ALTER COLUMN transfer SET DEFAULT 'on', 
   ALTER COLUMN cfwdall SET DEFAULT 'on', 
   ALTER COLUMN cfwdbusy SET DEFAULT 'on', 
   ALTER COLUMN dtmfmode SET DEFAULT 'outofband',
   ALTER COLUMN dndFeature SET DEFAULT 'on',
   ALTER COLUMN directrtp SET DEFAULT 'off',
   ALTER COLUMN earlyrtp SET DEFAULT 'progress',
   ALTER COLUMN mwilamp SET DEFAULT 'on',
   ALTER COLUMN mwioncall SET DEFAULT 'on',
   ALTER COLUMN pickupexten SET DEFAULT 'on',
   ALTER COLUMN pickupmodeanswer SET DEFAULT 'on',
   ALTER COLUMN private SET DEFAULT 'on',
   ALTER COLUMN privacy SET DEFAULT 'off',
   ALTER COLUMN nat SET DEFAULT 'off',
   ALTER COLUMN softkeyset SET DEFAULT 'softkeyset'

" ;

$check = $db->query($sql);
if(DB::IsError($check)) {
die_freepbx(“Can not modify sccpdevice table\n”);
}
?>

– phpMyAdmin SQL Dump
– version 4.0.5
http://www.phpmyadmin.net

– Host: localhost
– Erstellungszeit: 01. Sep 2013 um 14:26
– Server Version: 5.1.69
– PHP-Version: 5.3.3

SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;
SET time_zone = “+00:00”;

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8 */;


– Datenbank: asterisk



– Tabellenstruktur für Tabelle sccpdevmodel

CREATE TABLE IF NOT EXISTS sccpdevmodel (
id int(2) NOT NULL AUTO_INCREMENT,
model varchar(20) NOT NULL DEFAULT ‘’,
vendor varchar(40) DEFAULT ‘’,
dns int(2) DEFAULT ‘1’,
buttons int(2) DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;


– Daten für Tabelle sccpdevmodel

INSERT INTO sccpdevmodel (id, model, vendor, dns, buttons) VALUES
(1, ‘790X’, ‘CISCO’, 1, 0),
(2, ‘791X’, ‘CISCO’, 1, 0),
(3, ‘792X’, ‘CISCO’, 1, 0),
(4, ‘793X’, ‘CISCO’, 1, 0),
(5, ‘794X’, ‘CISCO’, 2, 2),
(6, ‘796X’, ‘CISCO’, 2, 6),
(7, ‘797X’, ‘CISCO’, 2, 6),
(8, ‘IP Communicator’, ‘CISCO’, 2, 8);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/
!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/
!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

$sql = "ALTER TABLE sccpline ALTER COLUMN incominglimit SET DEFAULT '2', ALTER COLUMN transfer SET DEFAULT 'on', ALTER COLUMN vmnum SET DEFAULT '*97', ALTER COLUMN musicclass SET DEFAULT 'default', ALTER COLUMN echocancel SET DEFAULT 'on', ALTER COLUMN silencesuppression SET DEFAULT 'off', ALTER COLUMN dnd SET DEFAULT 'on' " ; $sql = "CREATE TABLE IF NOT EXISTS `sccpline` ( `incominglimit` int(?) DEFAULT '2', `transfer` ???(?) DEFAULT 'on', `vmnum` ???(?) DEFAULT '*97', `musicclass` ???(?) DEFAULT 'default', `echocancel` ???(?) DEFAULT 'on', `silencesuppression` ???(?) DEFAULT 'off', `dnd` ???(?) DEFAULT 'on', ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ";

Sure, I alwy call Macgyver to get my car running…

Was it really necessary to post all of those database lines! If you read the documentation of that module you would have seen that to use the module you would have had to install SCCP-B first…

Ohhhhhhhhhhh really … seemingly I sould have post more lines for you … of course I had installed SCCP-B first.

No need to be snarky. The module is unsupported. We helped you as much as we could. We didn’t write it and the original author has not shown up since he/she released it.

As long there is no other sane alternative to CISCO WLAN Phones,
SCCP is needed. For that reason a module for FreePBX is also needed.

Let’s go! … Don’t cry me a river!

For legal reasons FreePBX will not include a SCCP module. Sorry

If you need this module so badly you might consider PAYING the developers at Schmooze Com to write it.

Or use your own time to try and track down the original developer and see if he or she can help you.