Phones – James Batchelor https://james-batchelor.com Useful I.T & VoIP Ramblings Sat, 23 Jan 2021 18:39:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://james-batchelor.com/wp-content/uploads/2025/05/cropped-cropped-logo-jb-202505-32x32.png Phones – James Batchelor https://james-batchelor.com 32 32 Provisioning a Cisco 7940/7960 https://james-batchelor.com/index.php/2021/01/23/provisioning-a-cisco-7940-7960/ Sat, 23 Jan 2021 18:39:58 +0000 http://james-batchelor.com/?p=736 Continue reading "Provisioning a Cisco 7940/7960"]]> 2021 is here and so returns (In the UK at least) one of my favourite shows to Netflix, The Office (US). Since starting working in VoIP its hard not to notice what phones turn up in TV shows, here the Cisco 7960, was prolific for showing up in shows around this era.

So why not, nearly 16 years after the show started, try and get one of these working on an Asterisk PBX? At work we had a number of similar 7940 models that hadn’t be used for years, so why not give it a try…

History

When the show started in 2005, these phones would need an entire Cisco ecosystem to support it, as it was essentially locked to Cisco’s propriety SCCP system. It was later and when the models were approaching end of life that a firmware update allowed it to communicate over SIP, therefore making it compatible with many more systems.

Before going further, I should note that I the telephony world, these things are ancient and have fallen way behind the capability that modern phones can offer. I would recommend these as a novelty and not be considered for deployment as it requires a lot of manual setup for little return, as we’ll go into….

Requirements

PBX: SIP based, for this example I’ll be using FreePBX, based on Asterisk.

Firmware: Dependent on what’s already loaded on the phone, you may need to source the P0S3-8-12-00 firmware that enables SIP. It can still be found with enough searching online.

TFTP Server: The 7940 can only be configured via TFTP and cannot be setup manually on the phone, so this is essential. In this example I’ll be using Windows Server 2019 and repurposing the TFTP element of Windows Deployment Services.

DHCP Options: The phones are pointed to the TFTP server via DHCP Options, a router or DHCP server capable of these is required. I’ll be setting this up on a Draytek 2862.

HTTP Server: Should you wish to add Services and a Directory, the phone pulls this information via HTTP.

Setup

TFTP Server

In Windows Server 2019, open Server Manager and start the Add Roles and Features Wizard.

In Server Roles, tick Windows Deployment Services

Then in Role Services, select just Transport Server to enable TFTP.

By default, Windows uses TFTP exclusively to deploy Windows images on client machines, so we’ll need to make a registry edit to allow the server to provide all files.

Open RegEdit, and navigate to:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WDSServer\Providers\WDSTFTP

TFTP files are served from C:\RemoteInstall by default, this can be changed by editing RootFolder value.

Edit ReadFilter value to add \* to allow all files to be read in the root folder.

To re load these changes, restart Windows Deployment Services Server from the Services folder.

DHCP Options

To allow the phone to know where the TFTP server is on boot, DHCP Option 150 is used to direct the phone.

Logged into the Draytek 2862, navigate to LAN –> General Setup –> DHCP Server Option button.

Enter Option Number 150, and enter the server IP address in the Data field:

To check its working, plug the phone into the network, after initial loading it will start looking for files at the server’s IP address.

Config Files

All of the phone’s functionality is provided by the config files. As a minimum the phone requires the following for use with SIP:

SIPDefault.cnf – Common configuration for all phones on the network, containing info such as SIP server.

SIP<MAC Address>.cnf – Phone’s individual config, such as extension registration info. File is named SIP001D45000000.cnf where 001D45000000 is the MAC address of the phone.

If your phone is loaded with SCCP firmware, for instance if it was pulled from a Cisco infrastructure environment, the phone will attempt to pull a different set of files from the TFTP server.

To identify SCCP firmware, when loading the top black bar will lack the “SIP” logo on the right.

If it is the older firmware, additional files are needed to instruct the phone to update its firmware:

XMLDefault.cnf.xml – First file served, specifies the firmware to load.

OS79XX.TXT – An alternative firmware pointer file.

Then you will need the firmware files, for reference / search purposes, these are the files needed:

P0S3-8-12-00.loads
P0S3-8-12-00.sb2
P0S3-8-12-00.tar
P0S3-8-12-00.bin
P0S3-8-12-00.sbin

Factory Reset

If the phone already loads and gives an extension, it will need to be factory reset:

With the phone unpowered, hold the # key. While holding, connect power to the phone and release the # key when the Headset, Mute and Speaker buttons start lighting in sequence.

Next whiles lights are still in sequence, press 123456789*0#.

When reset menu appears, press 2 to say no to keep network settings.

Phone will reboot and is ready to provision.

Provisioning

DHCP Option, TFTP Server, files in place, the phone can now be provisioned.

Dependant on firmware level it will take up to 5mins to upgrade and provision, during which and if all goes well will get some comforting references to the files served by the TFTP server.

You now have a Dunder Mifflin issued extension.

]]>
Yealink Remote Factory Reset https://james-batchelor.com/index.php/2019/07/06/yealink-remote-factory-reset/ Sat, 06 Jul 2019 16:27:46 +0000 http://james-batchelor.com/?p=602 Continue reading "Yealink Remote Factory Reset"]]> When a phone is no longer required on your service, there is always trepidation on what will happen to it, the hope is that’s its unplugged, stuffed in a drawer and never sees the light of day again. But in reality, there’s a good chance that it will end up on the likes of eBay and Gumtree, and since a phone is already provisioned with your server details, the next person to get their hands on it could have unauthorised access to the system.

The simple step to prevent unauthorised access is to delete / change the secret to the extension, if your will to put up with the constant failed registration attempts. But what about the personal data on the phone? BLFs, local directories and the like.

Yealink devices since firmware version 81 have had the ability to factory reset via a SIP notify command, meaning should a phone still be online, a factory reset can be handled remotely and without end user intervention.

Phone Setup

Remote reset is disabled by default, to enable it add the following to the provisioning template:

sip.notify_reset.enable = 1

Note: If you’d like to incorporate this with new deployments, ensure you also add the following to ensure sip notify commands are only trusted from registrar server.

account.1.sip_trust_ctrl = 1

PBX Setup

Via SFTP, Log in to the PBX and navigate to /etc/asterisk to locate the sip_notify.conf file.

Here there may be a few variants of the sip_notify.conf, such as sip_notify_additional.conf and sip_notify_custom.conf, choose the variant that does not contain the “do not edit” warning within the contents.

Choose the correct .conf file

In the correct file, add the following lines of code:

[yealink-reset]
Event=>reset

Next, log into the CLI (command line interface) of the PBX via SSH.

Enter asterisk -rvvv to open the Asterisk CLI at verbose level 3.

Enter reload to load the newly added code into the system.

Resetting

Now the reset command can be issued in the Asterisk CLI:

Asterisk Versions 1-3:

Sip notify yealink-reset NNNN

Asterisk Versions 13 onwards:

pjsip send notify yealink-reset endpoint NNNN

Where NNNN is the phones’ extension number.

All things well, you will get conformation of the Notify command being send, shortly followed by the device dropping offline.

Note: If you take advantage of the Yealink Remote Provisioning Service, remember to remove the device or enter sinkhole credentials, otherwise the phone will re-provision and come straight back to you.

]]>