Error After Applying Latest Beta 10 module upgrades

17 posts / 0 new
Last post
kenn10
kenn10's picture
Error After Applying Latest Beta 10 module upgrades

I received the following error message when I downloaded the modules to upgrade a current FreePBX 10 installation (PBX in a Flash, Version 2.0.6.2.1, Asterisk 10.1.12)

Reload failed because retrieve_conf encountered an error: 255
click here for more info

exit: 255 not writable

Added to globals: ASTETCDIR = /etc/asteriskAdded to globals: ASTMODDIR = /usr/lib/asterisk/modulesAdded to globals: ASTVARLIBDIR = /var/lib/asteriskAdded to globals: ASTAGIDIR = /var/lib/asterisk/agi-binAdded to globals: ASTSPOOLDIR = /var/spool/asteriskAdded to globals: ASTRUNDIR = /var/run/asteriskAdded to globals: ASTLOGDIR = /var/log/asteriskAdded to globals: CWINUSEBUSY = trueAdded to globals: AMPMGRUSER = adminAdded to globals: AMPMGRPASS = amp111Added to globals: AMPDBENGINE = mysqlAdded to globals: AMPDBHOST = localhostAdded to globals: AMPDBNAME = asteriskAdded to globals: AMPDBUSER = asteriskuserAdded to globals: AMPDBPASS = amp109Added to globals: VMX_CONTEXT = from-internalAdded to globals: VMX_PRI = 1Added to globals: VMX_TIMEDEST_CONTEXT =Added to globals: VMX_TIMEDEST_EXT = dovmAdded to globals: VMX_TIMEDEST_PRI = 1Added to globals: VMX_LOOPDEST_CONTEXT =Added to globals: VMX_LOOPDEST_EXT = dovmAdded to globals: VMX_LOOPDEST_PRI = 1Added to globals: MIXMON_DIR =Added to globals: MIXMON_POST =Notice: no Queues definedNotice: no Conferences definedNotice: no iax trunks definedNotice: no AMP Users definedPHP

Fatal error: Cannot redeclare class ext_senddtmf /var/www/html/admin/modules/googlevoice/functions.inc.php on line 331 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

tonyclewis
tonyclewis's picture
It appears to be a google

It appears to be a google voicemail module issue. Not sure who is maintaining that as it is not part of the FreePBX core team or out core modules that we support.

Tony Lewis
Schmooze Com, Inc.
FreePBX Developer

p_lindheimer
p_lindheimer's picture
Looks like the google voice

Looks like the google voice module declares a class, ext_senddtmf, before checking to make sure the class is not there.

This is a common mistake of module writers. They need something in extenstiones.class .php that we have not created so they declare it without checking if the class already exists or not.

The proper way to do this is to check for the class first and only declare it if it is not there. Furthermore, it's not hard to make sure that one of the developers get's it in extensions.class.php much earlier.

Anyhow … I believe there is a copy of that module in the contrubuted_modules directory, I'll have a look at updating it.

wardmundy
wardmundy's picture
Thanks

Looks like there is some sort of class check in GV 0.6 module... but I could be wrong. http://www.youtube.com/watch?v=d-J8_oXmWpo

tm1000
tm1000's picture
The check is apparently no

The check is apparently no longer checking against the right 'class'. This function was described to me by Moshe and Mikael. Where as Mikael and I made it work as seen in the current file.

I will have to check this out

Developer Schmoozecom, INC

tm1000
tm1000's picture
Here is the fix: function

Here is the fix:

function googlevoice_hookGet_config($engine) {
	global $ext;	
	if (!method_exists($ext, 'ext_senddtmf') && (!class_exists('ext_senddtmf'))) {
		class ext_senddtmf extends extension {
			var $digits;
			function ext_senddtmf($digits) {
				$this->digits = $digits;
			} 
			function output() {
				return 'SendDTMF('.$this->digits.')';
			}
		}
	}
}

Developer Schmoozecom, INC

tm1000
tm1000's picture
The code above is the

The code above is the approved fix.

As you can see here, my dialplan is a-ok with the above code (specifically this was an issue with the SendDTMF functionality)

[googlein]
include => googlein-custom
exten => ****@gmail.com,1,Noop(Receiving GoogleVoice call)
exten => ****@gmail.com,n,Set(CALLERID(name)=${CUT(CALLERID(name),@,1)})
exten => ****@gmail.com,n,GotoIf($["${CALLERID(name):0:2}" != "+1"]?notrim)
exten => ****@gmail.com,n,Set(CALLERID(name)=${CALLERID(name):2})
exten => ****@gmail.com,n(notrim),Set(CALLERID(number)=${CALLERID(name)})
exten => ****@gmail.com,n,Answer
exten => ****@gmail.com,n,Wait(1)
exten => ****@gmail.com,n,SendDTMF(1)
exten => ****@gmail.com,n,Goto(from-trunk,9999999999,1)

Developer Schmoozecom, INC

p_lindheimer
p_lindheimer's picture
#5606 filed against the

#5606 filed against the issue.

The tarball has been published out to the server.

sjbates
sjbates's picture
How do I apply this fix?

What steps should I take to resolve this issue?

Found it. I edited /var/www/html/admin/modules/googlevoice/functions.inc.php

You guys rock!

zeane
zeane's picture
Still Seeing an error!

The currently unsupported module (v0.70 - By Marcus Brown) for integration of Google Voice will not load, even with fix above still returns an error:

>>>>>>>

Reload failed because retrieve_conf encountered an error: 255

exit: 255
PHP Fatal error: Cannot redeclare class ext_gosub in /var/www/html/admin/libraries/extensions.class.php on line 471
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

>>>>>>>

Does Anyone have a solution?

Cheers...

~ ZEANE ~
~

~
~ Cape Town - South Africa ~

tm1000
tm1000's picture
Zeane, That error is

Zeane,

That error is un-related to google voice.

The google voice module doesnt reference class 'ext_gosub' therefore not a google voice issue. Sorry.

Developer Schmoozecom, INC

zeane
zeane's picture
Strange........?!?

Because, when I attempt to install the G Voice module (0.70), it will not allow me to proceed past the "apply config" button, returning the above error. When I uninstall the module, and "apply config" again, all is well (minus the G Voice module). Should I possibly completely re/uninstall something?

>>>>>>>>>>>>>>>

Error as shown on Dashboard

 retrieve_conf failed, config not applied

Reload failed because retrieve_conf encountered an error: 255
Added 29 seconds ago
(freepbx.RCONFFAIL)

>>>>>>>>>>>>>>>

Any suggestions would be appreciated... THX

~ ZEANE ~
~

~
~ Cape Town - South Africa ~

p_lindheimer
p_lindheimer's picture
did you grab the google

did you grab the google voice module form the contributed modules directory in our SVN tree?

itsme13
itsme13's picture
Google Voice 0.7.0 - fix

here is the fix, try it

from the asterisk server,

(Invalid code editing removed)

credit for the fix goes to the forums here.

tm1000
tm1000's picture
itme13, Please don't confuse

itme13,

Please don't confuse people by making them dig through code to 'fix' a problem that is no longer a problem. It was fixed months ago. Both in the public freepbc svn and on the github repo.

Download is here: http://www.the159.com/googlevoice/googlevoice-0.8.0.tgz

I am removing your code edits to protect people from causing more problems.

Developer Schmoozecom, INC

fischb22
fischb22's picture
this problem is back with v 0

this problem is back with v 0.9

fischb22
fischb22's picture
this problem is back with v 0

this problem is back with v 0.9