{"id":91,"date":"2010-01-29T20:49:25","date_gmt":"2010-01-29T19:49:25","guid":{"rendered":"http:\/\/lunatic.no\/?p=91"},"modified":"2010-01-29T20:49:25","modified_gmt":"2010-01-29T19:49:25","slug":"new-ami-commands-for-asterisk","status":"publish","type":"post","link":"http:\/\/130.61.186.249\/index.php\/2010\/01\/29\/new-ami-commands-for-asterisk\/","title":{"rendered":"New AMI commands for Asterisk"},"content":{"rendered":"<p>Our mobile-phone operator has given us access to live status information about all the phones in our subscription. What this means is that when one of our phones are being called to, or turned of, or even roaming to another country; they automagically notifies us instantly via a private API.<br \/>\nWhat this means, is that we can make this information available to our existing phone system. Since we are using Asterisk, I was going to connect to AMI and update the device state of the mobile phone in question, when we received a status update via the API. The problem is. Asterisk didn&#8217;t have any <a title=\"Asterisk Manager Interface\" href=\"http:\/\/www.voip-info.org\/wiki\/view\/Asterisk+manager+API\" target=\"_blank\" rel=\"noopener\">AMI<\/a> commands for updating Custom device states, only inside the dialplan. Luckily, it&#8217;s easy to add new commands to the AMI interface, and it was done in a jiffy.<br \/>\nIf anyone is interested, the patch is up at <a title=\"0016732: [patch] Add AMI support for device states\" href=\"https:\/\/issues.asterisk.org\/view.php?id=16732\" target=\"_blank\" rel=\"noopener\">https:\/\/issues.asterisk.org\/view.php?id=16732<\/a>.<br \/>\nNow, my <a href=\"http:\/\/www.aastra.com\/cps\/rde\/xchg\/04\/hs.xsl\/19703.htm\" target=\"_blank\" rel=\"noopener\">Aastra 57i<\/a> phone correctly lights up a red led, and shows a &#8220;un-hooked&#8221; icon in front of my extension on the <a href=\"http:\/\/www.aastra.com\/cps\/rde\/xchg\/SID-3D8CCB6A-9A52B04E\/04\/hs.xsl\/20684.htm\" target=\"_blank\" rel=\"noopener\">expansion module<\/a> on phone(or on the phone itself), when my mobile phone is in use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Our mobile-phone operator has given us access to live status information about all the phones in our subscription. What this means is that when one of our phones are being called to, or turned of, or even roaming to another country; they automagically notifies us instantly via a private API. What this means, is that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,34],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-asterisk","category-work"],"_links":{"self":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":0,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"wp:attachment":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}