{"id":26,"date":"2013-07-23T14:49:00","date_gmt":"2013-07-23T14:49:00","guid":{"rendered":"http:\/\/ibcloud.com.br\/blog\/comando-database-no-asterisk\/"},"modified":"2014-05-13T02:55:25","modified_gmt":"2014-05-13T02:55:25","slug":"comando-database-no-asterisk","status":"publish","type":"post","link":"https:\/\/humanizati.com.br\/blog\/2013\/07\/23\/comando-database-no-asterisk\/","title":{"rendered":"Comando &#8220;database&#8221; no Asterisk"},"content":{"rendered":"<h2><span style=\"font-family: Arial, Helvetica, sans-serif;\">Usando comando &#8220;database&#8221; no Asterisk<\/span><\/h2>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">Tch\u00ea\u00ea\u00ea!!! Como me enche o saco esse neg\u00f3cio de Do not Disturb no Asterisk, as pessoas n\u00e3o foram criadas para terem varias e boas op\u00e7\u00f5es a sua disposi\u00e7\u00e3o, o DND \u00e9 uma coisa muito boa, mas quando bem usado. Tem muito \u00edndio por ai mais folgado que lagarto em banhado que acaba usando essa \u00f3tima feature para n\u00e3o lavor\u00e1, olha tch\u00ea&#8230; eu fico loco com isso.<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">Mas pois bem&#8230;<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">Tendo em vista esta situa\u00e7\u00e3o precisei verificar se determinado ramal estava com o DND ativo, geralmente o pr\u00f3prio usu\u00e1rio tem acesso ao FOP na interface gr\u00e1fica e j\u00e1 verifica por l\u00e1 mesmo, mas este n\u00e3o foi o caso, ent\u00e3o parti pro CLI do Asterisk l\u00e1 encontrei o comando DATABASE, esse comando da uma vis\u00e3o geral de informa\u00e7\u00f5es do Asterisk em rela\u00e7\u00e3o a seus canais, por exemplo, nesse caso dando um&nbsp;<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">database show&nbsp;<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">\u00e9 poss\u00edvel ver a situa\u00e7\u00e3o de uma s\u00e9rie de configura\u00e7\u00f5es referente aos ramais configurados, \u00e9 poss\u00edvel por exemplo ver se o ramal esta com grava\u00e7\u00e3o ativada ou n\u00e3o, e o melhor, d\u00e1 pra ver se o DND esta ativo.<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">O comando tamb\u00e9m pode ser usado da seguinte forma:<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">database show &lt;ramal ou &nbsp;canal&gt;<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">assim se verifica as informa\u00e7\u00f5es referentes ao ramal ou cana espec\u00edfico.<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">Da pra fazer um mundarel de coisa atrav\u00e9s desse comando&#8230;<\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">Pra verificar exatamente o status do DND, se retornar VALUE: YES esta ativo<\/span><\/div>\n<div><span style=\"background-color: #d8d8d8; color: #333333; font-family: Times; font-size: 15px; line-height: 22.5px;\">database get DND 201<\/span><\/div>\n<div><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">Se a inten\u00e7\u00e3o for ativar io DND pelo CLI o comando abaixo resolve<\/span><\/div>\n<div><span style=\"background-color: #d8d8d8; color: #333333; font-family: Times; font-size: 15px; line-height: 22.5px;\">database put DND 201 YES<\/span><\/div>\n<div><span style=\"background-color: #d8d8d8; color: #333333; font-family: Times; font-size: 15px; line-height: 22.5px;\"><br \/><\/span><\/div>\n<div><span style=\"font-family: Arial, Helvetica, sans-serif;\">E se a inten\u00e7\u00e3o for desativar o DND ai o comando abaixo<\/span><\/div>\n<div>\n<div style=\"background-color: #fafafa; border: 0px; color: #333333; font-family: Times; font-size: 15px; line-height: 1.5em; margin-bottom: 18px; margin-right: 10px; padding: 0px; vertical-align: baseline;\"><span style=\"background-color: #d8d8d8;\">database del DND 201<\/span><\/div>\n<div style=\"background-color: #fafafa; border: 0px; color: #333333; font-family: Times; font-size: 15px; line-height: 1.5em; margin-bottom: 18px; margin-right: 10px; padding: 0px; vertical-align: baseline;\"><span style=\"color: black; font-family: Arial, Helvetica, sans-serif; font-size: small; line-height: normal;\">Buenas, eras isso&#8230; Um quebra costelas!<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Usando comando &#8220;database&#8221; no Asterisk Tch\u00ea\u00ea\u00ea!!! Como me enche o saco esse neg\u00f3cio de Do not Disturb no Asterisk, as pessoas n\u00e3o foram criadas para&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[52,53,54,56,55],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-database-asterisk","tag-database-show","tag-dnd-asterisk","tag-dnd-cli-asterisk","tag-do-not-disturb-asterisk"],"_links":{"self":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":1,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":86,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/26\/revisions\/86"}],"wp:attachment":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}