New AMI commands for Asterisk
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 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’t have any AMI commands for updating Custom device states, only inside the dialplan. Luckily, it’s easy to add new commands to the AMI interface, and it was done in a jiffy.
If anyone is interested, the patch is up at https://issues.asterisk.org/view.php?id=16732.
Now, my Aastra 57i phone correctly lights up a red led, and shows a “un-hooked” icon in front of my extension on the expansion module on phone(or on the phone itself), when my mobile phone is in use.