Member
Last active 14 years ago
removed for now :)
This will work as long as your using the context from-internal
# SCCP EXTENSIONS mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "select concat('SCCP/',extension) as channel,extension,name as label,concat(s1.id,'@default') as mailbox,'from-internal' as context,concat('*',s1.id,'@default') as extenvoicemail from users as u left join devices as s1 on u.extension=s1.id and s1.tech='custom' left join devices as s2 on u.extension=s2.id where s2.dial LIKE 'SCCP/%' order by extension" | sed '/\*\*/d' | sed 's/: /=/g' | while read LINEA do echo $LINEA | sed 's/channel=\(.*\)/\n[\1]\ntype=extension/g' done
You could build the buttons from the "Table devices in database asterisk" the tech feild will = custom and dial will = SCCP/EXTNUMBER
Not sure about the instructions but heres the [url=http://www.fop2.com/forum/View Post 179#p697:1qifp0rn]beta[/url:1qifp0rn]
#PARKSLOT=`/usr/sbin/asterisk -rx "dialplan show parkedcalls" | grep "=>" | cut -d= -f1 | sed s/\'//g | sed 's/ //g'`
#if [ "X${PARKSLOT}" != "X" ]; then
#echo
#echo "[PARK/default]"
#echo "extension=${PARKSLOT}"
#echo "context=parkedcalls"
#echo "type=park"
#echo "Label=Park ${PARKSLOT}"
#echo
#fi
The parking lot seems to be commented out in autoconfig-buttons-freepbx.sh for some reason, maybe its not ready yet.
Think this would be perfect for your phonebook as you could pull all the orginisations data in one go, not sure how big a job this would be so I may even look at doing it myself.
That fixed it for the most part, with the exception of one remaining error:
"notice
/var/www/html/fop2/lib/dblib.php (line 233)mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource"
I am going to use the fix posted by Thomas in a previous forum post
View Post 143&p=545&hilit=supplied+argument+is+not+a+valid+MySQL+result+resource#p545
But wanted to give a head's up.
I wouldn't do that because all I did in that post was give it a condition that it could never match, just switch debugging off and report it as a bug to Nicolas.
The visual_phonebook table structure in the beta changed. You are using the old structure. In the beta tarball there is a mysql-update.db file with the alter commands to add the missing fields. Best regards,
That would answer that bad result ;) Happy New Year.
Are you sure the config.php is setup properly?