Hi FOP2,
Today i know how astdb working on userdevice mode, i can see script agi user_login_out and i think we can change the script using shell script and execute the script on dialplan asterisk
Here is the small script example :
LOGIN
asterisk -rx "database put DEVICE/${DEVICE} user ${USER}"
asterisk -rx "database put AMPUSER/${USER} device ${DEVICE}"
asterisk -rx "dialplan add extension ${USER},hint,SIP/${DEVICE} into ext-local"
exten => s,n,UserEvent(UserDeviceAdded,Action: UserEvent,Data: ${USER}\,${DEVICE}\)
LOGOUT
asterisk -rx "database del AMPUSER ${USER}/device"
asterisk -rx "database put DEVICE/${DEVICE} user none"
asterisk -rx "dialplan remove extension ${USER}@ext-local hint"
exten => s,n,UserEvent(UserDeviceRemoved,Action: UserEvent,Data: ${USER}\,${DEVICE}\)
And variable "database show" we can set on asterisk using CLI database put/del etc
/AMPUSER/${USER}/device : 4001
/DEVICE/${DEVICE}/user : 100
etc....
My Question are :
What should i do on fop2 configuration to support userdevice mode on asterisk plain?
I only need fop2 monitoring GREEN color if i run command Login, GREY if run script LOGOUT and RED if i call out from device.
Thanks