Dave Heavy Industries Dave Heavy Industries – blog


SCCP and Asterisk

So, we bought a bunch of new cisco phones to replace some failing SNOM devices around the place. Realizing a chance to implement some great functionality, I decided to use chan-sccp-b to run them on the SCCP protocol instead of sip. I've put together some steps to help you through the process, and the module I wrote for freepbx (and how to expose that through to the elastix gui)

First things first, you'll need to get a copy of chan-sccp-b (http://chan-sccp-b.sourceforge.net/) and compile it. If you don't know how to do that, follow the steps on the chan-sccp-b site.

Grab a copy of my freepbx module -





I used this sccp.conf, pay attention to the bold lines, this is what tells chan-sccp-b to talk to the mysql database for it's config (which the freepbx module updates).

servername = Asterisk
 keepalive = 60
 debug = core,event,device,channel
 context = from-internal
 dateFormat = D.M.Y
 bindaddr =
 port = 2000
 firstdigittimeout = 16
 digittimeout = 8
 autoanswer_ring_time = 1
 autoanswer_tone = 0x32
 remotehangup_tone = 0x32
 transfer_tone = 0
 callwaiting_tone = 0x2d
 dnd = off
 sccp_tos = 0x68
 sccp_cos = 4
 audio_tos = 0xB8
 audio_cos = 6
 video_tos = 0x88
 video_cos = 5
 echocancel = on
 silencesuppression = off
 private = off
 meetme = on
 meetme = qxd
 hotline_enabled=yes ; can devices without configuration register
 hotline_context=default ; context for hotline
 hotline_extension=111 ; extension will be dialed on offHook

append this to your res_config_mysql.conf (your username, password  and database name added obviously)

 dbhost =
 dbname = asterisk
 dbuser = username
 dbpass = password

execute mysql-v5.sql from chan-sccp_trunk/conf of your downloaded chan-sccp-b source on your mysql database

mysql --user=user --password=password asterisk < mysql-v5.sql

install the module to freepbx (http://yourpbxip/admin )

Admin -> Module Admin ->Upload Module ->Chose File -> browse to sccp_module.tar.gz (downloaded from above) -> Upload
Admin -> Module Admin -> SCCP Manager -> Install -> Process (bottom right hand corner)  -> Confirm

Two new menus will be added under "Basic"

SCCP Device Manager
SCCP Line Manager
SCCP Button Manager <-- SCCP Button manager cannot be accessed directly, this is called via the SCCP Device Manager

Self explanatory really.

now the last step is to add sccp to the extension list so you can map extensions to SCCP.

edit /var/www/html/admin/modules/core/functions.inc.php around line 6041.

Add this above "$currentcomponent->setoptlistopts('devicelist', 'sort', false);" :-

$currentcomponent->addoptlistitem('devicelist', 'sccp', _("SCCP MAP"));

Now, for elastix, to get the module visible from the elastix gui, I ahd to add two lines to modules/pbxadmin/themes/default/main.tpl, just below extensions

<li><a href="/?menu=pbxconfig&amp;type=setup&amp;display=sccpline" >SCCP Line</a></li>
<li><a href="/?menu=pbxconfig&amp;type=setup&amp;display=sccpdevice" >SCCP Device</a></li>

Install JSON module for PHP

yum info php-pecl-json-1.2.1-4.el5.x86_64

and add to php.ini under Dynamic Extensions



and you're done!

Comments (29) Trackbacks (0)
  1. thank you David for this development.
    If you like, we can link your module and post from chan-sccp-b.sourceforge.net

  2. Hello David,

    First off, Thank you very much! This mod is awesome. One thing I noticed is that once you add devices/lines, there is not a way to delete them. Would you consider adding this? Thank you again for this module and how-to guide!

  3. So when I saw your posting on the CHAN-SCCP-B, I was really excited.

    I have a couple issues though that I hope you can help me understand. First off, where is the res_config_mysql.conf I need to edit and also trying to install the module on Freepbx I get this error:

    Filename not in correct format: must be modulename-version.[tar|tar.gz|tgz] (eg. custommodule-0.1.tgz)

    I’m really excited to try this out as I have done this manually in the past. Looking forward to hearing from you!


    • Hey mate,
      Rename it to sccp-module.tar.gz – freepbx doesn’t like the .0.0.4 business… I’ll work something out for the next update.

      As for res_config_mysql.conf…

      Mine looks like this
      dbhost =
      dbname = asteriskrealtime
      dbuser = asteriskuser
      dbpass = passwordhere
      ;dbport = 3306
      ;dbsock = /tmp/mysql.sock

      dbhost =
      dbname = asterisk
      dbuser = asteriskuser
      dbpass = passwordhere

  4. Hi David,

    First off, thank you for the freepbx module!

    I have a couple of questions.

    1.) When I enter a “device”, I don’t see any entries in the SCCPDevice table, or the SCCPDeviceconfig table. Where does the freepbx front end write those configs?

    2.) I can see the entry for the “line” I configured in the database, however, I don’t see it info updated in the sccp.conf. How does the phone “see” the newly created info in the FreePBX module?

    I hope my questions make sense… :-)

    thanks again for all the hard work!

    • Hey, saves in sccpdevice , sccpline and buttonconfig.

      The module writes to the db, and chan-sccp-b already knows how to read from the db

  5. I have an update. I’m seeing entries in the asterisk db for the sccp device and line that I’ve added, however the phone is not registering. I’m able to manually register the phone by editing the sccp.conf.

    Any ideas why chan-sccp is not pulling info from the database?



  6. Could someone explain this section, I’m afraid I’m lost here!!

    execute mysql-v5.sql from chan-sccp_trunk/conf of your downloaded chan-sccp-b source on your mysql database

    mysql –user=user –password=password asterisk < mysql-v5.sql


  7. Hey. What version of asterisk and freepbx/elastix do you recommend. I am having a hell of a time getting this working :(

  8. Hi Dave,
    thanks for sharing your work.
    As some of the above comments, I have problems following the described steps. Especially when it comes to the res_config_mysql.conf, which I cannot find.
    Could you share some more information on your freepbx/asterisk setup?

    • Hi Mike,

      I have the same problem, I can’t find res_config_mysql.conf files. I created but i think is not working.

      I installed yum install asterisk-addons asterisk-addons-mysql.

      I can only view the sccp line manager in freepbx gui, the other menu, the window become blank and no error message.

  9. Is it not creating the tftp file on version 0.4 anymore?

  10. Hello Dave,

    I have been able to follow your guide, but I cannot get my Cisco 7911 to register. Do you have have a template for the SEPMAC.cnf.xml file?

    Firmware version I’m using is SCCP 9.3.1

  11. I am trying to do a 7935 and wondering if any of the types that you have on there will work for that or how I can get that to work.

  12. Hi David,
    First off, thank you for the freepbx module!
    I have only one question: How to configure a softkey for cisco phones in your module?

  13. Is it possible to have device and user mode working with chan sccp? Currently when I try to login as an extension on one of the Cisco’s nothing happens.


Leave a comment

Trackbacks are disabled.