Either way it just displays “Device state:” to the console, with the DEVICE_STATE command doing nothing. Is there a better (more correct?) way to use this command? Thanks.
My first example uses “SIP/Some_User@voip-domain,” where, yes, I have obscured the actually sensitive details of the SIP/device URI of my test phone. That said the supplied SIP URI was 100% correct and represent a device that had an active call going on. In the second one I’m trying to pass in the standard channel variable ${CHANNEL}, so I don’t know what “bogus -” means.
So if a valid SIP URI cannot be used, and the channel identifier cannot be used, what does one pass to DEVICE_STATE? Also, does some module need to be loaded for DEVICE_STATE to work?
For SIP, DEVICE_STATE requires a section name in sip.conf (or users.conf). It does not use a SIP URI. In particular, you cannot request device state on a domain name, used literally.
SIP channel names differ from SIP device names in that they have “-” followed by a serial number, after the device name. This distinguishes between different channels terminating on the same device. (Historically, this was the address of the private data structure, rather than a serial number.)
From your other threads, it looks like you want information about the channel, not the device.
Thanks. In looking closer, another issue I have is that DEVICE_STATE does not show up if I do “core show functions” in the CLI. How do I go about adding this function in?
I cannot find any source/project to make menuselect. Also, in looking at the docs this looks like a build/install time activity. Am I going to jeopardize my already built test system by using this utility?
Thanks again, it would have taken me some time to even find out about menuselect.
Other possibilities, are that you are using an obsolete version, before it was introduced, or, you have auto loading disabled and haven’t loaded the relevant module.
I’m running 1.8.15. You mention modules. I can very easily copy in the relevant .so file into my modules directory, update modules.conf and reload everything. What module would I be looking for…app_devicestate or something?
Perfect. Turned out this was the very simply solution to my problem. Now at least I’m getting a state “INVALID” instead of nothing. Should just be tweaking from here. Thanks again.