{"id":602,"date":"2019-07-06T16:27:46","date_gmt":"2019-07-06T16:27:46","guid":{"rendered":"http:\/\/james-batchelor.com\/?p=602"},"modified":"2019-08-10T16:06:20","modified_gmt":"2019-08-10T16:06:20","slug":"yealink-remote-factory-reset","status":"publish","type":"post","link":"https:\/\/james-batchelor.com\/index.php\/2019\/07\/06\/yealink-remote-factory-reset\/","title":{"rendered":"Yealink Remote Factory Reset"},"content":{"rendered":"\n<p>When a phone is no longer required on your service, there is\nalways trepidation on what will happen to it, the hope is that\u2019s its unplugged,\nstuffed in a drawer and never sees the light of day again. But in reality,\nthere\u2019s a good chance that it will end up on the likes of eBay and Gumtree, and\nsince a phone is already provisioned with your server details, the next person\nto get their hands on it could have unauthorised access to the system.<\/p>\n\n\n\n<p>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. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/20190712_105139-1024x550.jpg\" alt=\"\" class=\"wp-image-603\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/20190712_105139.jpg 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/20190712_105139-300x161.jpg 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/20190712_105139-768x413.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>Yealink devices since firmware version 81 have had the\nability to factory reset via a SIP notify command, meaning should a phone still\nbe online, a factory reset can be handled remotely and without end user\nintervention.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Phone Setup<\/strong><\/h3>\n\n\n\n<p>Remote reset is disabled by default, to enable it add the\nfollowing to the provisioning template:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">sip.notify_reset.enable = 1<\/pre>\n\n\n\n<p>Note: If you\u2019d like to incorporate this with new\ndeployments, ensure you also add the following to ensure sip notify commands\nare only trusted from registrar server.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">account.1.sip_trust_ctrl = 1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>PBX Setup<\/strong><\/h3>\n\n\n\n<p>Via SFTP, Log in to the PBX and navigate to \/etc\/asterisk to\nlocate the sip_notify.conf file.<\/p>\n\n\n\n<p>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 \u201cdo not edit\u201d warning within the contents.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"177\" height=\"99\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/01.png\" alt=\"\" class=\"wp-image-604\"\/><figcaption>Choose the correct .conf file<\/figcaption><\/figure>\n\n\n\n<p>In the correct file, add the following lines of code:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">[yealink-reset]<br>Event=&gt;reset<\/pre>\n\n\n\n<p>Next, log into the CLI (command line interface) of the PBX\nvia SSH.<\/p>\n\n\n\n<p>Enter <em>asterisk -rvvv<\/em> to open the Asterisk CLI at verbose level 3.<\/p>\n\n\n\n<p>Enter <em>reload<\/em> to load the newly added code into the system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Resetting<\/strong><\/h3>\n\n\n\n<p>Now the reset command can be issued in the Asterisk CLI:<\/p>\n\n\n\n<p>Asterisk Versions 1-3: <\/p>\n\n\n\n<pre class=\"wp-block-verse\"><em>Sip notify yealink-reset NNNN<\/em><\/pre>\n\n\n\n<p>Asterisk Versions 13 onwards: <\/p>\n\n\n\n<pre class=\"wp-block-verse\"><em>pjsip send notify yealink-reset endpoint NNNN<\/em><\/pre>\n\n\n\n<p>Where <em>NNNN<\/em> is the phones\u2019 extension number.<\/p>\n\n\n\n<p>All things well, you will get conformation of the Notify command being send, shortly followed by the device dropping offline.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"92\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/03.png\" alt=\"\" class=\"wp-image-605\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/03.png 505w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/03-300x55.png 300w\" sizes=\"auto, (max-width: 505px) 85vw, 505px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Note:<\/strong> 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a phone is no longer required on your service, there is always trepidation on what will happen to it, the hope is that\u2019s its unplugged, stuffed in a drawer and never sees the light of day again. But in reality, there\u2019s a good chance that it will end up on the likes of eBay &hellip; <a href=\"https:\/\/james-batchelor.com\/index.php\/2019\/07\/06\/yealink-remote-factory-reset\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Yealink Remote Factory Reset&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[247],"tags":[252,259,253,260,255,258,251,250,254,257,256,248,249],"class_list":["post-602","post","type-post","status-publish","format-standard","hentry","category-voip","tag-asterisk","tag-bicom","tag-freepbx","tag-pbxinaflash","tag-phones","tag-piaf","tag-remote","tag-reset","tag-sip","tag-telephones","tag-telephony","tag-voip","tag-yealink"],"_links":{"self":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts\/602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":2,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"predecessor-version":[{"id":607,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts\/602\/revisions\/607"}],"wp:attachment":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}