Just installed the local version & cant get GV to work.

Discussions about using SIP Sorcery on your own computer/server
jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Just installed the local version & cant get GV to work.

Post by jaminmc » Wed Jan 06, 2010 3:32 am

I copied all of my SIP accounts and dial plans from my sipsorcery.com account, and it all seems to work, except the GV outgoing calls. They work just fine on the Sipsorcery.com site (When the site is not down).

I tried adding the newest GV patch, and it didn't work, so I went from the older ones to the newer ones. no difference. So is there something that has changed with GV that hasn't made it to the local version?

I get this

Code: Select all

DialPlan 22:12:54:375: SDP on GoogleVoiceCall call had RTP socket mangled from 192.168.1.242:4000 to 96.10.xx.xx:4000.
DialPlan 22:12:54:375: UAS call ignoring progress response with status of 180 as already in Proceeding.
DialPlan 22:12:54:375: Logging into google.com for xxx@gmail.com.
DialPlan 22:12:54:421: Google Voice pre-login page loaded successfully.
DialPlan 22:12:54:453: GALX key W8sQotHN4UQ successfully retrieved.
DialPlan 22:12:55:609: Google Voice home page loaded successfully.
DialPlan 22:12:55:656: Call key 6CCNch96NxU46e5XVEqGl4uaaJQ= successfully retrieved for xxx@gmail.com, proceeding with callback.
DialPlan 22:12:56:140: Exception on GoogleVoiceCall. The remote server returned an error: (500) Internal Server Error.
DialPlan 22:12:56:140: GoogleVoiceCall failed

jainpj
Posts: 173
Joined: Tue Dec 30, 2008 10:13 am

Post by jainpj » Wed Jan 06, 2010 12:27 pm

The server 500 error perhaps implies that you may not have patched it correctly. Which patched have you tried? You may try patch 4691. It worked for me.

jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Post by jaminmc » Wed Jan 06, 2010 4:45 pm

Is there something I have to do besides unzip the file, and out it in the sipsorcery-v1.1 folder and restart the program?

jainpj
Posts: 173
Joined: Tue Dec 30, 2008 10:13 am

Post by jainpj » Wed Jan 06, 2010 4:49 pm

yes that is it, but the one other thing that comes to my mind is set the dialplan correctly.
  • sys.GoogleVoiceCall("gv userid", "gv password", "callback number", "us number to dial", "gv number", "callback number phone type")
    sys.GoogleVoiceCall("johnsmith@gmail.com", "xxxxx", "1747xxxxxxx", "1xxxxxxxxxx", "805xxxxxxx", "7")

jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Post by jaminmc » Wed Jan 06, 2010 5:35 pm

Hmm, That seems to of been the issue. I had this as my dialplan:
sys.GoogleVoiceCall(GV_USER,GV_PASS,GIZMO5_NUMBER,@num,'.*',7)
And I guess that the Local Version is missing the incoming value.

I don't know if it is working now or not, as my google voice account seems to be having a hard time getting a dial out slot. (Even trying to use the website to place a call using my iphone, It says calling for a few seconds, then stops.)

So I will just try later :)

jainpj
Posts: 173
Joined: Tue Dec 30, 2008 10:13 am

Post by jainpj » Wed Jan 06, 2010 5:51 pm

jaminmc wrote:sys.GoogleVoiceCall(GV_USER,GV_PASS,GIZMO5_NUMBER,@num,'.*',7)
Please ensure to put double quotes around all the string values
  • GV_USER="abc@gmail.com"
    GV_PASS="mysecret"
    GIZMO5_NUMBER="17471234567"
    dest_num="12031234567"
    GV_NUMBER="18051234567"
    sys.GoogleVoiceCall(GV_USER,GV_PASS, GIZMO5_NUMBER,dest_num, GV_NUMBER,"7")

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

Post by MikeTelis » Wed Jan 06, 2010 7:08 pm

sys.GoogleVoiceCall(GV_USER,GV_PASS, GIZMO5_NUMBER,dest_num, GV_NUMBER,"7")
Since when the phone type parameter has become String? I've been using Integer since this parameter's day one and it works all the time.

jainpj
Posts: 173
Joined: Tue Dec 30, 2008 10:13 am

Post by jainpj » Wed Jan 06, 2010 7:24 pm

If you see posts on the forum, you will find confusion over the phone type parameter. Eventually most of them got it working as a string, including me. I think it may work as a number, but I don't have much knowledge of how ruby parameters are passed to .NET assemblies. But it definitely work as string.

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

Post by MikeTelis » Wed Jan 06, 2010 7:33 pm

It certainly works as an Integer. I don't think there is automatic type conversion on the way from Ruby to C#, so if it accepts both Int and Char, we should thank Aaron for that :)

jainpj
Posts: 173
Joined: Tue Dec 30, 2008 10:13 am

Post by jainpj » Wed Jan 06, 2010 8:08 pm

The latest code in codeplex has following overloaded methods for GoogleVoiceCall in DialPlanScriptHelper.cs
  • public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber)
    {
    GoogleVoiceCall(emailAddress, password, forwardingNumber, destinationNumber, null, DEFAULT_GOOGLEVOICE_PHONETYPE, 0);
    }

    public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, string fromURIUserToMatch)
    {
    GoogleVoiceCall(emailAddress, password, forwardingNumber, destinationNumber, fromURIUserToMatch, DEFAULT_GOOGLEVOICE_PHONETYPE, 0);
    }

    public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, string fromURIUserToMatch, int phoneType)
    {
    GoogleVoiceCall(emailAddress, password, forwardingNumber, destinationNumber, fromURIUserToMatch, phoneType, 0);
    }

    public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, string fromURIUserToMatch, int phoneType, int waitForCallbackTimeout)
    {
    .....
    }
Assuming the code running on sipsorcery.com is besd on the above, you will need to pass phone type as number.

However the patch is developed with phone type as string.
  • public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, bool notUsed)
    {
    GoogleVoiceCall(emailAddress, password, forwardingNumber, destinationNumber, null, "2");
    }

    public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber)
    {
    GoogleVoiceCall(emailAddress, password, forwardingNumber, destinationNumber, null, "2");
    }

    public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, string fromURIUserToMatch)
    {
    GoogleVoiceCall(emailAddress, password, forwardingNumber, destinationNumber, fromURIUserToMatch, "2");
    }

    public void GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, string fromURIUserToMatch, string phoneType)
    {
    ...
    }
So if you try to pass a number in the patch then it possibly won;t work. I can't remember now, but I think initially I was also passing it as a number and it didn't work. Then after getting suggestion on some thread I changed it to string and it worked, but the callback was not getting matched. Then I compiler the code again and found another dll missing the original patch and then every thing worked.

So for patch you will need to pass as string.

Post Reply