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.
-
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 inasterisk -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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login