rjaiswal
Active Member
- Joined
- May 24, 2013
- Messages
- 438
- Reaction score
- 58
NOTE: These instructions have been updated to support Asterisk 13. Current as of Sep. 6, 2015.
Earlier today, I posted instructions on how I got Exchange 2013 UM to talk with PiaF. Now, I'm going to post instructions on how I was able to add SCCP to my PiaF install, so I could use the native protocol for the Cisco 79xx series of phones.
These instructions allowed me to get SCCP running on PiaF installs that I've setup in the past. I like using SCCP, because I can get the cisco phones for dirt cheap on ebay and craigslist. I tell clients, who need a phone system, but can't afford new hardware what I plan on doing. Most will take the gamble of using used equipment, some don't. You can still buy new SCCP phones from cisco resellers.
Also, I've spent the last 2 years subscribed to the Chan-SCCP-B mailing list. Diederick and Marcello are AWESOME! They are very responsive to questions regarding SCCP and will quickly respond to bug issues. If you want to deploy SCCP in a commercial environment, I HIGHLY recommend joining the mailing list.
1. Download and untar the latest stable release of Chan SCCP-B. Current link is for latest 4.2 stable release. Please check the Chan SCCP-B website for the latest version.
2. Once untarred, you have to cd into the newly created directory and compile and install the SCCP source code:
3. Open TCP port 2000 in IPtables to allow communication between asterisk and phones running SCCP (NOTE: One of these commands will give an error depending upon your OS. Ignore it.):
4. Adjust /etc/asterisk/modules.conf to support SCCP:
5. Restart Asterisk to load the SCCP module: amportal restart
You have to add extensions in Freepbx, as well, as SCCP. They need to be the same. Freepbx will generate the dialplan, while SCCP will use the extension list to map extensions to handsets. When creating the extensions in Freepbx, you'll select "other (custom) device", instead of generic sip.
In the add extensions screen, use "SCCP/(ext. number)" as the dial string. Everything else in the add extensions screen can be modified to suit your installation.
For SCCP paging, Diederick created a macro that works pretty well. This was copied from the Chan-SCCP-B mailing list. Credit goes to Diederick for creating the script, and Bob for testing:
I added the following to extensions_custom.conf: (macro by Diederick)
;sof
[macro-2way-paging]
exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj)
exten => s,n,Dial(SCCP/${ARG1}/aa=2wb,5,A(beep))
exten => s,n(end),Busy(20)
exten => s,n,Macro(hangupcall,)
exten => s,check+101,Busy(20)
exten => s,n,Macro(hangupcall,)
;eof
Ran cli command
CLI> dialplan reload
I used the this to add the extensions to the db:
pbx1*CLI> database put DEVICE/4032/autoanswer macro 2way-paging
Updated database successfully
pbx1*CLI> database put DEVICE/4074/autoanswer macro 2way-paging
Updated database successfully
Step by step instructions:
1. Configure your paging group 9001 in FreePBX
- add a single phone to test with and add as system resources
allow - paging is VERY system resource intense so paging 100 phones all
at once can have bad results.
2. Add the following to /etc/asterisk/extensions_custom.conf:
[macro-1way-paging]
exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj)
exten => s,n,Dial(SCCP/${ARG1}/aa=1wb,5,A(beep))
exten => s,n(end),Busy(20)
exten => s,n,Macro(hangupcall,)
exten => s,check+101,Busy(20)
exten => s,n,Macro(hangupcall,)
In CLI... add the paging group in the database:
database put DEVICE/9100/autoanswer macro 1way-paging
To remove the paging group in the database:
database del DEVICE/9100/autoanswer macro
If you want 2 way paging use: (not suggested for multiple phones)
[macro-2way-paging]
exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj)
exten => s,n,Dial(SCCP/${ARG1}/aa=2wb,5,A(beep))
exten => s,n(end),Busy(20)
exten => s,n,Macro(hangupcall,)
exten => s,check+101,Busy(20)
exten => s,n,Macro(hangupcall,)
In CLI... add the paging group in the database:
database put DEVICE/9100/autoanswer macro 2way-paging
To remove the paging group in the database:
database del DEVICE/9100/autoanswer macro
Earlier today, I posted instructions on how I got Exchange 2013 UM to talk with PiaF. Now, I'm going to post instructions on how I was able to add SCCP to my PiaF install, so I could use the native protocol for the Cisco 79xx series of phones.
These instructions allowed me to get SCCP running on PiaF installs that I've setup in the past. I like using SCCP, because I can get the cisco phones for dirt cheap on ebay and craigslist. I tell clients, who need a phone system, but can't afford new hardware what I plan on doing. Most will take the gamble of using used equipment, some don't. You can still buy new SCCP phones from cisco resellers.
Also, I've spent the last 2 years subscribed to the Chan-SCCP-B mailing list. Diederick and Marcello are AWESOME! They are very responsive to questions regarding SCCP and will quickly respond to bug issues. If you want to deploy SCCP in a commercial environment, I HIGHLY recommend joining the mailing list.
1. Download and untar the latest stable release of Chan SCCP-B. Current link is for latest 4.2 stable release. Please check the Chan SCCP-B website for the latest version.
Code:
cd /usr/src
wget -O Chan_SCCP-V4.2_STABLE.tar.gz http://sourceforge.net/projects/chan-sccp-b/files/V4/Chan_SCCP-v4.2_STABLE_r6168.tar.gz/download
tar -zxvf Chan*
2. Once untarred, you have to cd into the newly created directory and compile and install the SCCP source code:
Code:
cd Chan*
./configure --enable-debug --enable-conference --disable-optimization
make && make install
3. Open TCP port 2000 in IPtables to allow communication between asterisk and phones running SCCP (NOTE: One of these commands will give an error depending upon your OS. Ignore it.):
Code:
sed -i '/9080/a \-A INPUT \-p tcp \-m tcp \-\-dport 2000 \-j ACCEPT' /etc/iptables/rules.v4
sed -i '/9080/a \-A INPUT \-p tcp \-m tcp \-\-dport 2000 \-j ACCEPT' /etc/sysconfig/iptables
iptables-restart
4. Adjust /etc/asterisk/modules.conf to support SCCP:
Code:
echo "noload = chan_skinny.so" >> /etc/asterisk/modules.conf
5. Restart Asterisk to load the SCCP module: amportal restart
You have to add extensions in Freepbx, as well, as SCCP. They need to be the same. Freepbx will generate the dialplan, while SCCP will use the extension list to map extensions to handsets. When creating the extensions in Freepbx, you'll select "other (custom) device", instead of generic sip.
In the add extensions screen, use "SCCP/(ext. number)" as the dial string. Everything else in the add extensions screen can be modified to suit your installation.
For SCCP paging, Diederick created a macro that works pretty well. This was copied from the Chan-SCCP-B mailing list. Credit goes to Diederick for creating the script, and Bob for testing:
I added the following to extensions_custom.conf: (macro by Diederick)
;sof
[macro-2way-paging]
exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj)
exten => s,n,Dial(SCCP/${ARG1}/aa=2wb,5,A(beep))
exten => s,n(end),Busy(20)
exten => s,n,Macro(hangupcall,)
exten => s,check+101,Busy(20)
exten => s,n,Macro(hangupcall,)
;eof
Ran cli command
CLI> dialplan reload
I used the this to add the extensions to the db:
pbx1*CLI> database put DEVICE/4032/autoanswer macro 2way-paging
Updated database successfully
pbx1*CLI> database put DEVICE/4074/autoanswer macro 2way-paging
Updated database successfully
Step by step instructions:
1. Configure your paging group 9001 in FreePBX
- add a single phone to test with and add as system resources
allow - paging is VERY system resource intense so paging 100 phones all
at once can have bad results.
2. Add the following to /etc/asterisk/extensions_custom.conf:
[macro-1way-paging]
exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj)
exten => s,n,Dial(SCCP/${ARG1}/aa=1wb,5,A(beep))
exten => s,n(end),Busy(20)
exten => s,n,Macro(hangupcall,)
exten => s,check+101,Busy(20)
exten => s,n,Macro(hangupcall,)
In CLI... add the paging group in the database:
database put DEVICE/9100/autoanswer macro 1way-paging
To remove the paging group in the database:
database del DEVICE/9100/autoanswer macro
If you want 2 way paging use: (not suggested for multiple phones)
[macro-2way-paging]
exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj)
exten => s,n,Dial(SCCP/${ARG1}/aa=2wb,5,A(beep))
exten => s,n(end),Busy(20)
exten => s,n,Macro(hangupcall,)
exten => s,check+101,Busy(20)
exten => s,n,Macro(hangupcall,)
In CLI... add the paging group in the database:
database put DEVICE/9100/autoanswer macro 2way-paging
To remove the paging group in the database:
database del DEVICE/9100/autoanswer macro