{"id":6426,"date":"2020-08-10T14:11:02","date_gmt":"2020-08-10T20:11:02","guid":{"rendered":"http:\/\/gregsowell.com\/?p=6426"},"modified":"2020-08-11T10:21:08","modified_gmt":"2020-08-11T16:21:08","slug":"access-yealinks-rest-api","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=6426","title":{"rendered":"Access Yealink&#8217;s Rest API"},"content":{"rendered":"<p><a href=\"http:\/\/support.yealink.com\/faq\/faqInfo?id=173\">Yealink has a pretty useful Rest API <\/a>that allows for some fun manipulation to phones.  You can do things like start speaker phone and initiate a call or in my case, you can have it enable\/disable DND.<\/p>\n<p>To enable\/disable DND via cURL it&#8217;s as simple as:<br \/>\nON<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">curl -X POST --ciphers &#039;DEFAULT:!DH&#039; -d &quot;&quot; --user Username:MyPassword https:\/\/192.168.51.251\/cgi-bin\/ConfigManApp.com?key=DNDOn -k -s<\/code><\/pre>\n<p>OFF<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">curl -X POST --ciphers &#039;DEFAULT:!DH&#039; -d &quot;&quot; --user Username:MyPassword https:\/\/192.168.51.251\/cgi-bin\/ConfigManApp.com?key=DNDOff -k -s<\/code><\/pre>\n<p>My <a href=\"https:\/\/github.com\/gregsowell\/ansible-voip\/blob\/master\/yealink-dnd.yml\">github playbook <\/a>based on this is here:<br \/>\n<script src=\"http:\/\/gist-it.appspot.com\/https:\/\/github.com\/gregsowell\/ansible-voip\/blob\/master\/yealink-dnd.yml\"><\/script><\/p>\n<p>If your system throws an error about the <a href=\"http:\/\/gregsowell.com\/?p=6424\">old cipher in use you might have a look at this post<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yealink has a pretty useful Rest API that allows for some fun manipulation to phones. You can do things like start speaker phone and\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-6426","post","type-post","status-publish","format-standard","hentry","category-voip"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/6426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6426"}],"version-history":[{"count":3,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/6426\/revisions"}],"predecessor-version":[{"id":6432,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/6426\/revisions\/6432"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}