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.
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.
No, fop2 does not uses regexp matching any more. But it supports a really powerful method of doing autoconfiguration using your own scripts, it is not hard to create a script to create buttons based on anything you could get from a command line script, being a database result set, an ldap query, asterisk queries to the manager, etc.
I thought FOP2 would keep backward compatibility.
But OK.
Thanks.
In the original announcement I mentioned clearly the difference and that fop2 actually had less features (at that time) than fop1, this was on june 2009:
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.