Good afternoon. I initially opened this over on the Asterisk forum, and the findings there led me to open a bug, but I was asked to put the issue in these forums instead.
Here’s the deal… I’m trying to create a little demo applet that basically makes some phone BLF’s randomly show activity for a demonstration. In researching, it seems the DevState command is the way to do this (granted, I still need to figure out how to make a linux script issue those commands to asterisk).
In attempting this, I discovered only CUSTOM entities can be controlled by the DevState command, so I created 3 dummy extensions (1011, 1012, and 1013) in FPBX13 - type, Custom.
They were dialable, but DevState commands never actually changed their status - even though the Asterisk CLI said “Device x State changed to Ringing” (or whatever command I issued).
Over on the Asterisk forum, someone identified the reason the DevState wasn’t working was because it appeared the hint was improperly formatted.
CUSTOM/1011
I submitted the bug report over on the issues site, and was told this is assembled from the Advanced tab of the extension (the DIAL) field. I manually adjusted to be:
CUSTOM:1011
and sure enough, DevState now worked exactly as expected.
However, now you couldn’t call the extension, because of course dialing expects “technology/resource”. I thought I’d get crafty and put:
Custom/1011&Custom:1011
in the Dial field. This permitted the DevState to still work, but still couldn’t be dialed.
Its odd to me that dialing requires “technology/resource” but hints expect it with a colon (“Custom:resource”). And, unfortunately, DevState only works with Custom devices.
So, a couple questions have arisen from this little fiasco:
- If I manually set it in the dial string with a :, how can I still permit it to be dialed (I’m assuming some additional wizardry in the custom extensions file can achieve this)…
- How could I script it to auto run various DevState commands - I know how to write a linux script, but I’m unsure what linux commands I could issue which would send instructions to Asterisk specifically…
- Is something not quite right? - colons and slashes - is the way the hint is generated askew and does that logic need to be tweaked…
Thoughts?