sys.GoogleVoiceSMS Now available.

Catalog of dial plans
Post Reply
LHM
Posts: 164
Joined: Tue Jul 28, 2009 7:11 pm

sys.GoogleVoiceSMS Now available.

Post by LHM » Tue Aug 31, 2010 7:35 pm

sys.GoogleVoiceSMS(username, password, number, message)

I have an E71 (WiFi VoIP/Sip client) smartphone and would like set this up in my SS dial plan.
Does anyone have a working setup/DP using sys.GoogleVoiceSMS that they are willing to share?

LHM
Posts: 164
Joined: Tue Jul 28, 2009 7:11 pm

Re: sys.GoogleVoiceSMS Now available.

Post by LHM » Sat Oct 16, 2010 1:57 pm

Using the Complex Dial, below causes a syntax error.

when /^911/ then sys.GoogleVoiceSMS(me@gmail.com,passwrd,3211234567,911 was called from Home - Check at Home Now!!!!)

I also so have this in speed dial section '911' => '61586xxxxx', # Emergency Call Center

Can this be made to work? If so how do I integrate it in to the Complex Dial plan?

Thanks in advance.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: sys.GoogleVoiceSMS Now available.

Post by MikeTelis » Sat Oct 16, 2010 6:08 pm

Did you forget to enclose strings into quotes?

when /^911/ then sys.GoogleVoiceSMS('me@gmail.com','passwrd','3211234567','911 was called from Home - Check at Home Now!!!!')

LHM
Posts: 164
Joined: Tue Jul 28, 2009 7:11 pm

Re: sys.GoogleVoiceSMS Now available.

Post by LHM » Sat Oct 16, 2010 8:03 pm

MikeTelis wrote:Did you forget to enclose strings into quotes?

when /^911/ then sys.GoogleVoiceSMS("me@gmail.com','passwrd','3211234567','911 was called from Home - Check at Home Now!!!!")
Yes, I forgot the quotes. Thanks, that solved the syntax error. However SMS is not sent and there is no evidence/activity in the console or GV Text Logs. I placed the above in the select VSP section of the dial plan, hopefully that is correct. Yes?

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: sys.GoogleVoiceSMS Now available.

Post by MikeTelis » Sat Oct 16, 2010 8:27 pm

There are many different versions of my dialplan and I can't tell what exactly is going on in your case. One thing is for sure: an initial ** Call from ... to 911 message must appear in the console.

LHM
Posts: 164
Joined: Tue Jul 28, 2009 7:11 pm

Re: sys.GoogleVoiceSMS Now available.

Post by LHM » Sat Oct 16, 2010 8:34 pm

Call from to does appear as it normally does, it is just that there is no SMS reference in the console.
I am using Complex DP w CNAM (Not version2) see link http://code.google.com/p/google-voice-s ... exDialPlan

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: sys.GoogleVoiceSMS Now available.

Post by MikeTelis » Sat Oct 16, 2010 8:48 pm

Again, I can't tell for sure. For example, if you enabled safeguards and 91 is not in the list of allowed country codes, the call will be rejected (91 will be treated as country code).

Or, 911 may be in your Speeddial table and gets "translated" into something else...

You need to thoroughly check console trace and find out what's wrong.

LHM
Posts: 164
Joined: Tue Jul 28, 2009 7:11 pm

Re: sys.GoogleVoiceSMS Now available.

Post by LHM » Sat Oct 16, 2010 9:09 pm

Safe guards are not enabled. There is nothing in the console except the normal call to from entry lines. I guess I'll have to do trial an error approach as the console indicates nothing but a normal successful call and nothing else. It is as if sys.GoogleVoiceSMS does not exist.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: sys.GoogleVoiceSMS Now available.

Post by MikeTelis » Sun Oct 17, 2010 5:07 am

The problem is here:

Code: Select all

unless @num.sub!(/^(\+|00|011)/,'')  # If no international prefix, process special cases below
      case @num
        when /^[2-9]\d{6,6}$/       # Local call, 7-digit number
          @num = '1' + Area + @num  # prefix it with country and area code
        when /^[01]?([2-9]\d{9,9})/ # US number with or without "1" country code
          @num = '1' + $1           # add country code and truncate number to 10-digit
        when /^\*/                  # Voxalot voicemail, echotest & other special numbers
          else
            rejectCall(603,'Wrong number, check & dial again')
      end
    end
All numbers that do not match 7-, 10- or 11-digit pattern are rejected. It's supposed that all short numbers like 411 or 911 will be processed either by Speeddial or by adding of "when" clause to this case operator.

Post Reply