Trying have Polcyom phones to show correct Buddy status after user login/logout.
Fixed devices shows correct Buddy status, but “Adhoc” devices will not show correct status.
Conditions
freepbx-2.6.0RC2
Asterisk 1.6.6
Polcyom 601, SIP version 3.1.3.0439
’/etc/amportal.conf’ has
AMPEXTENSIONS=deviceanduser
DYNAMICHINTS=true
- Upon user log in/out (*11/*12) to an ‘Adhoc’ device, error log shows ‘pbx.c: Function DEVSTATE not registered’.
Line 522 in ’ user_login_out.agi’:
$agi->set_variable(‘DEVSTATE(Custom:QUEUE’.$device.’*’.$queueno.’)’,$queuestat);
Should not DEVSTATE be replaced with $DEVSTATE (maps to DEVICE_STATE or DEVSTATE) to support both 1.4 and 1.6 …?
- Problem with hints.
‘core show hints’ from the command line interface (CLI) initialy show all hints OK.
But when a user logout on a ‘Adhoc’ device (with no default user set for that deviec), the hint seems to be completely removed from the hint list. The other phones subscribing to this user on the hintlist (watchers) will show that user as BUSY (well that is on Polcyom icons and Buddyy list). So it is not possible to know if the user is on the phone, or if the user is logged out. After a (long) while, the phone recovers the correct state (I belive this is the SIP session timer expiring, not sure).
If however I (prior to the logout) set the DEV_STATE from the CLI with
’devstate change Custom:DND379 BUSY’, then logout with *12
- all the Polycom phones subscribing to that hint will correctly show ‘Away’ for that user.
Then, after the user (eg. 379 as user) later logs on again, the hint must (for reasons I do not know) be set from CLI with either :
a) ‘devstate change Custom:DND379 INVALID’,
c) ‘devstate change Custom:DND379 UNAVAILABLE’
- to make the phone to answer again. Else after a login the phone is still not reachable. I guess that this can be asterisk assuming the user still is BUSY, and that ‘DND=IVALID’ or ‘DND=UNAVAILABLE’ clears that state.
I an not sure if I got all this right. I find the agent vs. users, vs. devices and difficult understand… The ‘devstate’ command also seems a bit ambiguous, as it apply not only for a device, but also can be used to set a state for a user (and a user is not a device, or ?)
Any comments will be appreciated!
Kind regards,
Eirik