Thursday, March 31, 2016

Register Cisco 8851,9971 to Freepbx(Asterisk)







1.Freepbx needs to have transport mode TCP enabled. to do this, edit file /etc/asterisk/sip_general_custom.conf with the following lines,

tcpenable=yes  
tcpbindaddr=0.0.0.0

Then, under device(or extension) setting in Freepbx, for the phone number you want the phone to associate with, set


2. Optionally, grab a working phone configuration file SEPxxxxxxxxxxxx.cnf.xml from a Cisco Callmanager.This configuration serves as a template.

3. Config file for 8851.
<device> 
   <deviceProtocol>SIP</deviceProtocol> 
   <sshUserId>admin</sshUserId> 
   <sshPassword>password</sshPassword> 
   <devicePool> 
      <dateTimeSetting> 
         <dateTemplate>M/D/YA</dateTemplate> 
         <timeZone>Eastern Standard/Daylight Time</timeZone> 
         <ntps> 
            <ntp> 
               <name>pool.ntp.org</name> 
               <ntpMode>Unicast</ntpMode> 
            </ntp>         
         </ntps> 
      </dateTimeSetting> 
      <callManagerGroup> 
         <members> 
            <member priority="0"> 
               <callManager> 
                  <ports> 
                     <ethernetPhonePort>2000</ethernetPhonePort> 
                     <sipPort>5060</sipPort> 
                     <securedSipPort>5061</securedSipPort> 
                  </ports> 
                  <processNodeName>[Your Freepbx IP]</processNodeName> 
               </callManager> 
            </member> 
         </members> 
      </callManagerGroup> 
   </devicePool> 
   <sipProfile> 
      <sipProxies> 
         <backupProxy></backupProxy> 
         <backupProxyPort>5060</backupProxyPort> 
         <emergencyProxy></emergencyProxy> 
         <emergencyProxyPort></emergencyProxyPort> 
         <outboundProxy></outboundProxy> 
         <outboundProxyPort></outboundProxyPort> 
         <registerWithProxy>true</registerWithProxy> 
      </sipProxies> 
      <sipCallFeatures> 
         <cnfJoinEnabled>true</cnfJoinEnabled> 
         <callForwardURI>x-serviceuri-cfwdall</callForwardURI> 
         <callPickupURI>x-cisco-serviceuri-pickup</callPickupURI> 
         <callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI> 
         <callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI> 
         <meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI> 
         <abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI> 
         <rfc2543Hold>false</rfc2543Hold> 
         <callHoldRingback>2</callHoldRingback> 
         <localCfwdEnable>true</localCfwdEnable> 
         <semiAttendedTransfer>true</semiAttendedTransfer> 
         <anonymousCallBlock>2</anonymousCallBlock> 
         <callerIdBlocking>2</callerIdBlocking> 
         <dndControl>0</dndControl> 
         <remoteCcEnable>true</remoteCcEnable> 
      </sipCallFeatures> 
      <sipStack> 
         <sipInviteRetx>6</sipInviteRetx> 
         <sipRetx>10</sipRetx> 
         <timerInviteExpires>180</timerInviteExpires> 
         <timerRegisterExpires>3600</timerRegisterExpires> 
         <timerRegisterDelta>5</timerRegisterDelta> 
         <timerKeepAliveExpires>120</timerKeepAliveExpires> 
         <timerSubscribeExpires>120</timerSubscribeExpires> 
         <timerSubscribeDelta>5</timerSubscribeDelta> 
         <timerT1>500</timerT1> 
         <timerT2>4000</timerT2> 
         <maxRedirects>70</maxRedirects> 
         <remotePartyID>false</remotePartyID> 
         <userInfo>None</userInfo> 
      </sipStack> 
      <autoAnswerTimer>1</autoAnswerTimer> 
      <autoAnswerAltBehavior>false</autoAnswerAltBehavior> 
      <autoAnswerOverride>true</autoAnswerOverride> 
      <transferOnhookEnabled>false</transferOnhookEnabled> 
      <enableVad>false</enableVad> 
      <dtmfAvtPayload>101</dtmfAvtPayload> 
      <dtmfDbLevel>3</dtmfDbLevel> 
      <dtmfOutofBand>avt</dtmfOutofBand> 
      <alwaysUsePrimeLine>false</alwaysUsePrimeLine> 
      <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail> 
      <kpml>3</kpml> 
      <phoneLabel>FlyYoung</phoneLabel> 
      <stutterMsgWaiting>1</stutterMsgWaiting> 
      <callStats>false</callStats> 
      <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts> 
      <disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig> 
      <sipLines> 
         <line button="1"> 
            <featureID>9</featureID> 
            <featureLabel>[Directory Number]</featureLabel> 
            <proxy>[Your Freepbx IP]</proxy> 
            <port>5060</port> 
            <name>[Directory Number]</name> 
            <displayName>[Directory Number]</displayName> 
            <autoAnswer> 
               <autoAnswerEnabled>2</autoAnswerEnabled> 
            </autoAnswer> 
            <callWaiting>3</callWaiting> 
            <authName>[Directory Number]</authName> 
            <authPassword>[device registration password]</authPassword> 
            <sharedLine>false</sharedLine> 
            <messageWaitingLampPolicy>3</messageWaitingLampPolicy> 
            <messagesNumber>*97</messagesNumber> 
            <ringSettingIdle>4</ringSettingIdle> 
            <ringSettingActive>5</ringSettingActive> 
            <contact>100</contact> 
            <forwardCallInfoDisplay> 
               <callerName>true</callerName> 
               <callerNumber>false</callerNumber> 
               <redirectedNumber>false</redirectedNumber> 
               <dialedNumber>true</dialedNumber> 
            </forwardCallInfoDisplay> 
         </line>
      </sipLines> 
      <voipControlPort>5060</voipControlPort> 
      <startMediaPort>16348</startMediaPort> 
      <stopMediaPort>20134</stopMediaPort> 
      <dscpForAudio>184</dscpForAudio> 
      <ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy> 
      <dialTemplate>dialplan.xml</dialTemplate> 
      <softKeyFile></softKeyFile> 
   </sipProfile> 
   <commonProfile> 
      <phonePassword></phonePassword> 
      <backgroundImageAccess>true</backgroundImageAccess> 
      <callLogBlfEnabled>2</callLogBlfEnabled> 
   </commonProfile> 
   <loadInformation>SIP88xx.10-2-2-16</loadInformation> 
   <vendorConfig> 
      <disableSpeaker>false</disableSpeaker> 
      <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset> 
      <pcPort>0</pcPort> 
      <settingsAccess>1</settingsAccess> 
      <garp>0</garp> 
      <voiceVlanAccess>0</voiceVlanAccess> 
      <videoCapability>0</videoCapability> 
      <autoSelectLineEnable>0</autoSelectLineEnable> 
      <webAccess>0</webAccess> 
   <sshAccess>0</sshAccess>
   <sshPort>22</sshPort>
      <daysDisplayNotActive>1,7</daysDisplayNotActive> 
      <displayOnTime>08:00</displayOnTime> 
      <displayOnDuration>00:05</displayOnDuration> 
      <displayIdleTimeout>00:05</displayIdleTimeout> 
      <spanToPCPort>1</spanToPCPort> 
      <loggingDisplay>1</loggingDisplay> 
      <loadServer></loadServer> 
   </vendorConfig> 
   <userLocale> 
      <name>English_United_States</name> 
      <uid>1</uid> 
      <langCode>en_US</langCode> 
      <version>1.0.0.0-1</version> 
      <winCharSet>iso-8859-1</winCharSet> 
   </userLocale> 
   <networkLocale>United_States</networkLocale> 
   <networkLocaleInfo> 
      <name>United_States</name> 
      <uid>64</uid> 
      <version>1.0.0.0-1</version> 
   </networkLocaleInfo>    
   <deviceSecurityMode>1</deviceSecurityMode> 
   <authenticationURL></authenticationURL> 
   <directoryURL>http://[Your Freepbx IP]/ciscodir/menu.xml</directoryURL> 
   <servicesURL></servicesURL> 
   <idleURL></idleURL> 
   <informationURL></informationURL> 
   <messagesURL></messagesURL> 
   <proxyServerURL></proxyServerURL> 
   <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig> 
   <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices> 
   <dscpForCm2Dvce>96</dscpForCm2Dvce> 
   <transportLayerProtocol>2</transportLayerProtocol><!--Note, transport has to be 2(tcp) to work, 4(UDP) doesn't work for 88xx/99xx--> 
   <capfAuthMode>0</capfAuthMode> 
   <capfList> 
      <capf> 
         <phonePort>3804</phonePort> 
      </capf> 
   </capfList> 
   <certHash></certHash> 
   <encrConfig>false</encrConfig>
</device>

4.Config file for 9971
<device> 
   <deviceProtocol>SIP</deviceProtocol> 
   <sshUserId>admin</sshUserId> 
   <sshPassword>password</sshPassword> 
   <devicePool> 
      <dateTimeSetting> 
         <dateTemplate>M/D/YA</dateTemplate> 
         <timeZone>Eastern Standard/Daylight Time</timeZone> 
         <ntps> 
            <ntp> 
               <name>pool.ntp.org</name> 
               <ntpMode>Unicast</ntpMode> 
            </ntp>         
         </ntps> 
      </dateTimeSetting> 
      <callManagerGroup> 
         <members> 
            <member priority="0"> 
               <callManager> 
                  <ports> 
                     <ethernetPhonePort>2000</ethernetPhonePort> 
                     <sipPort>5060</sipPort> 
                     <securedSipPort>5061</securedSipPort> 
                  </ports> 
                  <processNodeName>[Your Freepbx IP]</processNodeName> 
               </callManager> 
            </member> 
         </members> 
      </callManagerGroup> 
   </devicePool> 
   <sipProfile> 
      <sipProxies> 
         <backupProxy></backupProxy> 
         <backupProxyPort>5060</backupProxyPort> 
         <emergencyProxy></emergencyProxy> 
         <emergencyProxyPort></emergencyProxyPort> 
         <outboundProxy></outboundProxy> 
         <outboundProxyPort></outboundProxyPort> 
         <registerWithProxy>true</registerWithProxy> 
      </sipProxies> 
      <sipCallFeatures> 
         <cnfJoinEnabled>true</cnfJoinEnabled> 
         <callForwardURI>x-serviceuri-cfwdall</callForwardURI> 
         <callPickupURI>x-cisco-serviceuri-pickup</callPickupURI> 
         <callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI> 
         <callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI> 
         <meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI> 
         <abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI> 
         <rfc2543Hold>false</rfc2543Hold> 
         <callHoldRingback>2</callHoldRingback> 
         <localCfwdEnable>true</localCfwdEnable> 
         <semiAttendedTransfer>true</semiAttendedTransfer> 
         <anonymousCallBlock>2</anonymousCallBlock> 
         <callerIdBlocking>2</callerIdBlocking> 
         <dndControl>0</dndControl> 
         <remoteCcEnable>true</remoteCcEnable> 
      </sipCallFeatures> 
      <sipStack> 
         <sipInviteRetx>6</sipInviteRetx> 
         <sipRetx>10</sipRetx> 
         <timerInviteExpires>180</timerInviteExpires> 
         <timerRegisterExpires>3600</timerRegisterExpires> 
         <timerRegisterDelta>5</timerRegisterDelta> 
         <timerKeepAliveExpires>120</timerKeepAliveExpires> 
         <timerSubscribeExpires>120</timerSubscribeExpires> 
         <timerSubscribeDelta>5</timerSubscribeDelta> 
         <timerT1>500</timerT1> 
         <timerT2>4000</timerT2> 
         <maxRedirects>70</maxRedirects> 
         <remotePartyID>false</remotePartyID> 
         <userInfo>None</userInfo> 
      </sipStack> 
      <autoAnswerTimer>1</autoAnswerTimer> 
      <autoAnswerAltBehavior>false</autoAnswerAltBehavior> 
      <autoAnswerOverride>true</autoAnswerOverride> 
      <transferOnhookEnabled>false</transferOnhookEnabled> 
      <enableVad>false</enableVad> 
      <dtmfAvtPayload>101</dtmfAvtPayload> 
      <dtmfDbLevel>3</dtmfDbLevel> 
      <dtmfOutofBand>avt</dtmfOutofBand> 
      <alwaysUsePrimeLine>false</alwaysUsePrimeLine> 
      <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail> 
      <kpml>3</kpml> 
      <phoneLabel>FlyYoung</phoneLabel> 
      <stutterMsgWaiting>1</stutterMsgWaiting> 
      <callStats>false</callStats> 
      <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts> 
      <disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig> 
      <sipLines> 
         <line button="1"> 
            <featureID>9</featureID> 
            <featureLabel>101</featureLabel> 
            <proxy>[Your Freepbx IP]</proxy> 
            <port>5060</port> 
            <name>[Directory Number]</name> 
            <displayName>[Directory Number]</displayName> 
            <autoAnswer> 
               <autoAnswerEnabled>2</autoAnswerEnabled> 
            </autoAnswer> 
            <callWaiting>3</callWaiting> 
            <authName>[Directory Number]</authName> 
            <authPassword>password</authPassword> 
            <sharedLine>false</sharedLine> 
            <messageWaitingLampPolicy>3</messageWaitingLampPolicy> 
            <messagesNumber>*97</messagesNumber> 
            <ringSettingIdle>4</ringSettingIdle> 
            <ringSettingActive>5</ringSettingActive> 
            <contact>101</contact> 
            <forwardCallInfoDisplay> 
               <callerName>true</callerName> 
               <callerNumber>false</callerNumber> 
               <redirectedNumber>false</redirectedNumber> 
               <dialedNumber>true</dialedNumber> 
            </forwardCallInfoDisplay> 
         </line>
      </sipLines> 
      <voipControlPort>5060</voipControlPort> 
      <startMediaPort>16348</startMediaPort> 
      <stopMediaPort>20134</stopMediaPort> 
      <dscpForAudio>184</dscpForAudio> 
      <ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy> 
      <dialTemplate>dialplan.xml</dialTemplate> 
      <softKeyFile></softKeyFile> 
   </sipProfile> 
   <commonProfile> 
      <phonePassword></phonePassword> 
      <backgroundImageAccess>true</backgroundImageAccess> 
      <callLogBlfEnabled>2</callLogBlfEnabled> 
   </commonProfile> 
   <loadInformation>sip9971.9-4-1-9</loadInformation> 
   <vendorConfig> 
      <disableSpeaker>false</disableSpeaker> 
      <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset> 
      <pcPort>0</pcPort> 
      <settingsAccess>1</settingsAccess> 
      <garp>0</garp> 
      <voiceVlanAccess>0</voiceVlanAccess> 
      <videoCapability>1</videoCapability><!--0 disable 1 enable--> 
      <ciscoCamera>1</ciscoCamera><!--0 disable 1 enable--> 
   <autoSelectLineEnable>0</autoSelectLineEnable> 
      <webAccess>0</webAccess> 
   <sshAccess>0</sshAccess>
   <sshPort>22</sshPort>
      <daysDisplayNotActive>1,7</daysDisplayNotActive> 
      <displayOnTime>08:00</displayOnTime> 
      <displayOnDuration>00:05</displayOnDuration> 
      <displayIdleTimeout>00:05</displayIdleTimeout> 
      <spanToPCPort>1</spanToPCPort> 
      <loggingDisplay>1</loggingDisplay> 
      <loadServer></loadServer> 
   </vendorConfig> 
   <userLocale> 
      <name></name> 
      <uid>1</uid> 
      <langCode>en_US</langCode> 
      <version>1.0.0.0-1</version> 
      <winCharSet>iso-8859-1</winCharSet> 
   </userLocale> 
   <networkLocale></networkLocale> 
   <networkLocaleInfo> 
      <name></name> 
      <uid>64</uid> 
      <version>1.0.0.0-1</version> 
   </networkLocaleInfo>    
   <deviceSecurityMode>1</deviceSecurityMode> 
   <authenticationURL></authenticationURL> 
   <directoryURL>http://[Your Freepbx IP]/ciscodir/menu.xml</directoryURL> 
   <servicesURL></servicesURL> 
   <idleURL></idleURL> 
   <informationURL></informationURL> 
   <messagesURL></messagesURL> 
   <proxyServerURL></proxyServerURL> 
   <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig> 
   <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices> 
   <dscpForCm2Dvce>96</dscpForCm2Dvce> 
   <transportLayerProtocol>2</transportLayerProtocol> <!--Note, transport has to be 2(tcp) to work, 4(UDP) doesn't work for 88xx/99xx-->
   <capfAuthMode>0</capfAuthMode> 
   <capfList> 
      <capf> 
         <phonePort>3804</phonePort> 
      </capf> 
   </capfList> 
   <certHash></certHash> 
   <encrConfig>false</encrConfig> 
</device>

5.Background wallpager
For 8851, the background wallpapgers need to be stored in path /Desktops/800x480x24, check size and format specifications here.
For 8871, folder is /Desktops/640x480x24, and specifications here.

6. TFTP.
Freepbx has a TFTP server pre-intsalled.
Relevant configuration notes are as follows.

tftp conf file is located at
nano /etc/xinetd.d/tftp

# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        disable = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s -c /tftpboot #default tftp root folder
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

service xinetd status to check tftp service status

netstat -a |grep tftp to monitor the live tftp traffic

Make sure to check Windows firewall for testing because it by default blocks the tftp traffic(what I experienced)


2 comments:

  1. Hi, may I ask some questions? Where should SEPxxxxxxxxxxxx.cnf.xml be located in TFTP server? In /tftpboot?
    And do we need other config files in the directory?

    ReplyDelete
  2. I managed t use your template to load sip 10-2-2-16 but still the phone does not register with my elastix pbx

    ReplyDelete