Bug Report
If your extensions start with 0 the shell script (autoconfig-users-freepbx.sh) fails because bash interprets leading 0's as octal and you get the following error:
/usr/local/fop2/autoconfig-users-freepbx.sh: line 11: 06997: value too great for base (error token is "06997")
You can of course put a leading 10# on the appropriate entities to force it to read them as base 10 but then it strips leading 0. This is kludgey and should probably be written another way instead of just forcing to base 10 since that doesn't really have the desired effect either.
/usr/local/fop2/autoconfig-users-freepbx.sh: line 11: 06997: value too great for base (error token is "06997")
You can of course put a leading 10# on the appropriate entities to force it to read them as base 10 but then it strips leading 0. This is kludgey and should probably be written another way instead of just forcing to base 10 since that doesn't really have the desired effect either.
11c11
< eval `cat /etc/asterisk/voicemail.conf | grep -v "^\;" | grep "=>" | cut -d, -f1 | sed 's/ //g' | sed 's/\([^=]*\)=>\(.*\)/Fop2Clave[\1]=\2;/g'`
---
> eval `cat /etc/asterisk/voicemail.conf | grep -v "^\;" | grep "=>" | cut -d, -f1 | sed 's/ //g' | sed 's/\([^=]*\)=>\(.*\)/Fop2Clave[10#\1]=\2;/g'`
30c30
< echo -n $LINEA | sed 's/EMPTYSECRET/'${Fop2Clave[${MYEXTEN}]}'/g' | sed 's/: /:/g'
---
> echo -n $LINEA | sed 's/EMPTYSECRET/'${Fop2Clave[10#${MYEXTEN}]}'/g' | sed 's/: /:/g'
Comments