1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bad Week for Google Voice

Discussion in 'Bug Reporting and Fixes' started by wardmundy, Feb 21, 2012.

  1. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
    Just when we thought we had Humpty Dumpty put back together again with a quick fix to the broken Google Voice CLI tool, gvoice, come two more problems. First, a FreePBX 2.10 update breaks the Google Voice module (fix below), and then word that the Asterisk 10.1.x release breaks gtalk and Google Voice (no fix in sight). Read on...

    [​IMG]

    DO NOT APPLY THE NEW FREEPBX 2.10 UPDATES WITHOUT FIRST UPDATING YOUR VERSION OF GOOGLE VOICE FreePBX MODULE TO 0.7 (on the next page) OR applying the one line patch at the bottom of this page after logging into your server as root.

    Special thanks to Andrew Nagy for the quick fix!
     
    #1 wardmundy, Feb 21, 2012
    Last edited by a moderator: Apr 11, 2016
  2. shanghai

    shanghai
    Expand Collapse
    New Member

    Joined:
    Jul 23, 2009
    Messages:
    2
    Likes Received:
    0
    Aaarg... Too late. I blindly updated. Is there any remedy?
     
  3. kenn10

    kenn10
    Expand Collapse
    Guru-ish

    Joined:
    Dec 16, 2007
    Messages:
    734
    Likes Received:
    85

    I had to uninstall the Google Voice module to get the updates to apply. If you re-install the GV module again, you still have a problem. I have a message on the FreePBX board and whoever is responsible for the GVoice module needs to correct their coding and submit an update to the module.
     
  4. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
  5. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
    Are you sure you're running the 0.6 module?? The error you posted on the FreePBX forum shows a problem at line 331. My 0.6 version doesn't get a match at that line number, and the 0.6 edition appears to check for the class existence.

    You can download the 0.6 module from here.
     
  6. shanghai

    shanghai
    Expand Collapse
    New Member

    Joined:
    Jul 23, 2009
    Messages:
    2
    Likes Received:
    0
    FYI, I am running 0.6 and here is the error I get:
    PHP Fatal error: Cannot redeclare class ext_senddtmf in /var/www/html/admin/modules/googlevoice/functions.inc.php on line 33
     
  7. tm1000

    tm1000
    Expand Collapse
    Schmoozecom INC/FreePBX

    Joined:
    Dec 1, 2009
    Messages:
    1,369
    Likes Received:
    80
    Here is the fix:

    Code:
    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.')';
    			}
    		}
    	}
    }
     
  8. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
    Will this work with earlier FreePBX 2.10 or 2.9??
     
  9. tm1000

    tm1000
    Expand Collapse
    Schmoozecom INC/FreePBX

    Joined:
    Dec 1, 2009
    Messages:
    1,369
    Likes Received:
    80
    Yes. All I added was another class check.

     
  10. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
    Perfect. Thanks!!

    Here's the one-line patch that needs to be applied. No harm if you accidentally run it more than once. Or you can download and apply the new module update on the next page...

    Code:
    sed -i "s/'ext_senddtmf')) {/'ext_senddtmf') \&\& (\!class_exists('ext_senddtmf'))) {/" /var/www/html/admin/modules/googlevoice/functions.inc.php
     
  11. tm1000

    tm1000
    Expand Collapse
    Schmoozecom INC/FreePBX

    Joined:
    Dec 1, 2009
    Messages:
    1,369
    Likes Received:
    80
  12. tm1000

    tm1000
    Expand Collapse
    Schmoozecom INC/FreePBX

    Joined:
    Dec 1, 2009
    Messages:
    1,369
    Likes Received:
    80
    Just so 'everyone' is aware. No one is responsible for this module. It was written by someone outside of FreePBX and sort-of became a joint effort between Tony (Schmooze), Moshe, Mikael, Philippe, MZB (Original Author) and I. So I wouldn't rely on updates as it's not at all fully supported, it could break in 2.11 and never be fixed again. So please, please, don't demand it to be fixed.

     
  13. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
    You're absolutely right. But we all appreciate the prompt effort this time around! Thanks, Andrew.
     
  14. kenn10

    kenn10
    Expand Collapse
    Guru-ish

    Joined:
    Dec 16, 2007
    Messages:
    734
    Likes Received:
    85
    Thanks to all for the fix!!!!

    Yes! Thanks to all for the quick fix on this. Maybe this fix will last until GV stops being free. :biggrin5:
     
  15. MichiganTelephone

    MichiganTelephone
    Expand Collapse
    Guru

    Joined:
    Jun 29, 2009
    Messages:
    259
    Likes Received:
    0
    If it's not one thing it's another — while this likely wouldn't affect most PiaF users, Asterisk 10 users should be aware that any upgrade past version 10.0.x apparently breaks Google Voice support for both incoming and outgoing calls. See http://issues.asterisk.org/jira/browse/ASTERISK-19374 for the bug report. I can't take credit for finding this, user "candrewsintegralblue" left a comment on my blog that tipped me off to this. In another comment on the same article posted today, a reader wrote how he set up YATE as a gateway between Google Voice and Asterisk, and he says it works 100% of the time. That might be a piece of information worth filing away in the back of your mind, in case Digium's GV support drops to nil.
     
  16. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    12,125
    Likes Received:
    1,691
    I Just Don't Get It

    Interesting how breaking chan_gtalk apparently is in the Asterisk Dev Team's charter, but when it comes to fixing it... "chan_gtalk is an extended support module, and hence supported by the Asterisk community. Response times may reflect that."

    Meanwhile back at the ranch, the Digium Dev Team has been busy crowing about Asterisk's Google Voice, Gtalk, Jabber, and XMPP integration in its rundown of the Top 10 Tricks for Asterisk. :crazy:

    [​IMG]
     
  17. lgaetz

    lgaetz
    Expand Collapse
    Pundit

    Joined:
    Sep 15, 2009
    Messages:
    2,793
    Likes Received:
    524
    I recognized the name, pretty sure it is the same candrews on this forum who has made himself useful on the superfecta project.
     
  18. atsak

    atsak
    Expand Collapse
    Guru

    Joined:
    Sep 7, 2009
    Messages:
    1,545
    Likes Received:
    117
    I setup a new system today and wondered what had gone wrong; found the googlevoice reference in the logs, showed up here, and it was already fixed.

    Awesome.
     
  19. darmock

    darmock
    Expand Collapse
    PIAF Developer

    Joined:
    Oct 18, 2007
    Messages:
    2,898
    Likes Received:
    97
    Good old Ward you are way too polite. Wonderful how gv integration is held up as a shining beacon of light and then anonymous developers break it with no thought if their changes will impact on a very popular (yet dare we say.... unprofitable.....) feature.

    Damn those black helicopters are flying overhead again but now they have a capital D on the side. hmmmm

    Tom
     
  20. nunya

    nunya
    Expand Collapse
    Member

    Joined:
    Oct 1, 2010
    Messages:
    44
    Likes Received:
    3
    GV module

    Forgive my ignorance here, as I'm a bit out of the loop. What is the difference between the FreePBX GV module and the GV module by Marcus Brown?
     

Share This Page