Guys, is there a way to add more presence statuses into asterisk-im + spark?
right now it works great when a user is on a call so spark shows the phone icon, etc.
but say, I want to be able to show if a user dials *21 to forward calls to voicemail, then spark can show the user as been out of the office or something… is this possible?
the idea would be to listen to custom message thruthe asterisk manager (which can be triggerd by userevents) and then change the user status in spark to somethig (i dont know if spark send the status to the server or if the server could push a status change to spark)… I guess the server can push changes to spark or else how would spark know a user is on the phone… so how can we take advantage of this?
As far as I can tell Spark-IM doesnt really get much in terms of status messages from Asterisk, it mostly pushes. Calls are a different matter and spark knows when someone is being called so it can set that status.
Because of this design I think the better solution would be to go the opposite way, have spark-im trigger the voicemail forwarding.
Example: User A sets his status to “Out of Office.” Spark-IM sees the status change and executes a script that forwards calls to voicemail.
Both ideas would be great… either a user can change their status on spark or using their phone, now, one problem would be, if the user changes their spark status to out of office and forwards to voicemail, if they shutdown their pc, status is changed to pffline but the forward should not be removed on asterisk… anyway… I think the communication channel is there, spark gets phone call statuses from asterisk (via the manager event) and changes its status on openfire -> pc spark client … so the idea would be, instead of just getting status from the manager like on the phone, dialing, etc, using userevents, be able to interpret more statuses and switch spark to away with customs texts defined somewher or passed to spark from openfire…
This would certainly be possible. But I doubt it will be useful for many people and it has the addtional drawback that it requires changing the dialplan which I would like to avoid.