Google Voice Dial Out

New features you'd like see on SIP Sorcery

Postby mel2000 » Wed Sep 30, 2009 6:41 pm

Since you're having the same misbehaving IPKall CID problem that many others are having, you need to change your SIPnum from the 253XXXXXXX IPKall number to the 206.XXX.XXXX number instead, then sys.GoogleVoiceCall() should match.

You should also delete the /^311/ line since that only applies to Chicago residents.

The Incoming portion of your dialplan looks incomplete.
mel2000
 
Posts: 150
Joined: Fri Jun 05, 2009 11:27 pm

Postby MikeTelis » Wed Sep 30, 2009 8:09 pm

mel2000,

please note this thread. Now that Aaron implemented pattern matching, misbehaving IPKall is no longer a factor :)

Since I'm not expecting any calls from 206 area code, I used the following match parameter:

'^(408xxxxxxx|206)'

(xxxxxxxx is my GV number in 408 area code). Works like a charm!
MikeTelis
 
Posts: 1138
Joined: Wed Jul 30, 2008 6:48 am

Postby mel2000 » Wed Sep 30, 2009 10:02 pm

Mike, thanks for the heads up on the change. Could you verify the correct syntax for using two variables in a pattern match? For example:
Code: Select all
  GV_nbr1 = "773xxxxxxx"
  GV_nbr2 = "206xxxxxxx"
...
    when /^311/ then sys.GoogleVoiceCall(GV_email,GV_pwd,SIPnum,"3127445000","#{GV_nbr1}|#{GV_nbr2}")
or
    when /^311/ then sys.GoogleVoiceCall(GV_email,GV_pwd,SIPnum,"3127445000",GV_nbr1|GV_nbr2)
mel2000
 
Posts: 150
Joined: Fri Jun 05, 2009 11:27 pm

Postby MikeTelis » Thu Oct 01, 2009 4:29 am

mel2000,

I would use this syntax:

Code: Select all
    when /^311/ then sys.GoogleVoiceCall(GV_email,GV_pwd,SIPnum,"3127445000","^(#{GV_nbr1}|#{GV_nbr2})")


just to be on the safe side.
MikeTelis
 
Posts: 1138
Joined: Wed Jul 30, 2008 6:48 am

Postby mel2000 » Thu Oct 01, 2009 9:11 am

Thanks. I'll try it whenever I decide to experiment with IPKall again.
mel2000
 
Posts: 150
Joined: Fri Jun 05, 2009 11:27 pm

Postby Stiefel » Fri Oct 02, 2009 4:26 am

MikeTelis wrote:You're welcome! Out of curiosity, was I right, you did put /^000/ pattern after /^00/ in case statement? :wink:


Yes, you're right, this was one of the mistakes.

But
Code: Select all
dst = req.URI.User.to_str
trimmedDst = dst[3..(dst.length-3)]

didn't work, because a dialed number like 00018004664411 was changed into 180046644 - the first 3 and the last 2 digits were missing.

So I tryed
Code: Select all
dst = req.URI.User.to_str
trimmedDst = dst[3..(dst.length-1)]

and the result is that a dialed number like 00018004664411 is changed into 18004664411 (btw. that's the number of Goog411) - only the first 3 digits are missing as planed (even I don't understand why that is so and what the syntax of this string is).

Now I found this
Code: Select all
when /^000/ then sys.GoogleVoiceCall("user name", "password", "1747xxxxxxx", {req.URI.User.to_s[3,50]})


I'll try this one - if it will work fine, I would understand why... ;-)

Edit: Is there any difference between req.URI.User.to_str and req.URI.User.to_s ?
Arne »Stiefel« Robertson
Berlin, Germany
User avatar
Stiefel
 
Posts: 10
Joined: Tue Jun 24, 2008 4:13 am
Location: Berlin, Germany

Postby ossiemaracay » Fri Oct 02, 2009 2:46 pm

Mike & Mel:

Thanks a lot for all your help.

I used the new parameter ^(305xxxxxxx|206xxxxxxx)' and my GV/IPKALL dial plan is finally working as expected!!

Is there a way to force sipsorcery to pass the actual CID to the ATA when receiving a incoming call using IPKALL?
ossiemaracay
 
Posts: 12
Joined: Fri Aug 14, 2009 1:48 pm
Location: Miami, FL USA

Postby MikeTelis » Fri Oct 02, 2009 3:54 pm

Is there a way to force sipsorcery to pass the actual CID to the ATA when receiving a incoming call using IPKALL?

Sipsorcery passes whatever CID it received from IPKall (unless you tweak CID in your "In" dialplan, which I believe is not the case). If your IPKall number is so-called "misbehaving" one, it will send a wrong CID to Sipsorcery (typically CID of a local termination). There's nothing you can do about it... the only suggestion - forward your incoming calls via some other provider (e.g. Gizmo5). The other providers have their own problems, though... :(

Stiefel,

Interworking with C# is a bit tricky. Sometimes you have to use to_s, sometimes to_str, and yet there is ToString(). Sometimes 2 or even all 3 work fine. Typically you have to find out what works on this or that particular object, by try and error.

Long ago I found that to_s works fine on req.URI.User and have been using it this way ever since.

As to your experiments with dst.length, I don't see why would you need all that. You have a pattern in "when" and the most natural way would be to use this pattern for removing leading of leading zeroes:

Code: Select all
when /^000(1[2-9]\d{2}[2-9]\d{6})/ then sys.GoogleVoiceCall("user name", "password", "1747xxxxxxx", $1)


After all, the pattern will make sure you have a valid US number after 000 :)

P.S. If you want to remove 3 first chars from a string, use this:

dst[3..-1]

No need in all that "length" gymnastics :)
MikeTelis
 
Posts: 1138
Joined: Wed Jul 30, 2008 6:48 am

ipkall call back broken

Postby guduri » Sat Oct 03, 2009 1:37 pm

I am one of the lucky ones where my ipkall caller id comes back correctly.

But since a few hours when I make a call, my calls fail with a fast busy. I noticed in the console that the google voice callback is timing out calling back my ipkall number to patch the call.

Everything works fine if I use a sipgate or a gizmo number. Is anyone else noticing this?
guduri
 
Posts: 87
Joined: Tue Jun 09, 2009 10:11 pm
Location: Ann Arbor, MI

Postby MikeTelis » Sat Oct 03, 2009 1:52 pm

Even "good" IPKall numbers sometimes deliver CID of local termination number. Fortunately, a few days ago Aaron updated GoogleVoiceCall and now it accepts patterns in "match" parameter (see my post dd Sep, 30 and follow the link).
MikeTelis
 
Posts: 1138
Joined: Wed Jul 30, 2008 6:48 am

PreviousNext

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron