Howdy,
I am currently using asterisk 1.4. I would like to set a manual or fake device state and make the blf light on. Saying it was fake means the extension can still dial out if they want to. Is there a way I can do this?
Please help me out.
Thanks
Asterisk 1.4 is almost 6 years beyond end of life, and doesn’t support custom device states.
Yes I agree with you, our system is 10years old and it does have a lot of customer in it and upgrading it is not an option right now. Is there any other way?
Anyone here?
I just want to do this.
asterisktest*CLI> devstate change Custom:SIP/4000 Busy
Changing SIP/4000 to Busy
but it’s not changing to Busy
4000@local-extensions: SIP/4000 State:Idle Watchers 1
If you guys have idea please let me know.
Thanks.
jcolp
January 23, 2018, 1:27am
5
You can’t. The hint is using “SIP/4000” which is a device. It’s not a custom device state and you can’t control it using devstate change. You would have to reference “Custom:SIP/4000” in the hint instead.
1 Like
I see. Talking about hint, is it possible to set a BUSY state even though the phone is available to be called?
jcolp
January 23, 2018, 1:34am
7
No, you can’t control the device state of it so you can’t do that.
Thank you jcolp, do you have any other way in mind that can do this?
“This” being manipulate presence information on Asterisk 1.4?
Change your Hint.
exten => _4XXX,hint,SIP/${EXTEN}&Custom:DND${EXTEN}
Then change the device state of Custom:DND4000
He’s using Asterisk 1.4 and I don’t think that custom hints had been introduced in that version!
Hi John, when I use that to one of my hint is shows like this, when I hit core show hints
@macro-ASetHintInUse : SIP/&Custom:InUse State:Idle Watchers 0,
should this be okay?
results is this,
Executing [s@macro-AChangeDeviceState-InUse:2] Set(“SIP/409-00000173”, “DEVICE_STATE(Custom:InUse413 )=INUSE”) in new stack.
is this is my command to change the devstate
exten => s,n,Set(DEVICE_STATE(Custom:InUse413)=INUSE),
can you tell me what I am missing?
What you are missing is that this wasn’t introduced until a later version of Asterisk.
That does not look correct.
I gave an example above on how to hint an extension to both a SIP device and a custom field.
I don’t think you would want to hint your macro extension, instead the hint should likely be part of the extension for the user.
@david551 there was a backport of the device state stuff to 1.4, I’m assuming that’s what @anakngsultan is using.
Hi John,
This works for me, slightly change but your suggestion is my base.
thanks again.