Auto Buttons. Can I use on FOP2?
Hi there.
In FOP1 I used to setup FOP buttons using AUTO BUTTONS, like, [AUTO/SIP/.*] ; matches SIP/*.
Is this feature still available on FOP2?
Thanks in advance.
PS.: I do not use FreePBX, Elastix, or any other Asterisk in a Box Distro.
In FOP1 I used to setup FOP buttons using AUTO BUTTONS, like, [AUTO/SIP/.*] ; matches SIP/*.
Is this feature still available on FOP2?
Thanks in advance.
PS.: I do not use FreePBX, Elastix, or any other Asterisk in a Box Distro.
Comments
But OK.
Thanks.
View Post 2
There is a strong reason not to use regular expressions, just run fop1 and fop2 servers side by side and compare cpu usage. The benefits of regexp buttons are limited and do not justify at all their existance. You can substitute the AUTO/SIP with a proper autoconfig script.
Here is a rather crude example, there are other in the online doc:
#!/bin/bash
for A in `asterisk -rx "sip show peers" | awk '{print $1}' | cut -d/ -f1 | sed -e '1d'`
do
echo "[SIP/$A]"
echo "type=extension"
echo "extension=$A"
echo "context=from-internal"
echo "label=Extension $A"
echo "mailbox=$A@default"
echo "extenvoicemail=*$A@from-internal"
done
(Not tested, just typed it here as is), then you execute this in your button configuration file via an #exec command, and you will have automatic sip buttons for your panel.