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

FOOD FOR THOUGHT Google Voice-SIP gateway

Discussion in 'Trunks' started by billsimon, Oct 27, 2011.

  1. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    Having been a bit fed up with Asterisk's flakiness with native Google Voice peering, I spent a good amount of time researching other solutions and have come up with a Google Voice-SIP gateway solution I have been using for a couple weeks and found to be rock solid.

    I've packaged it up to offer to others as a service you can configure on the web. I invite you to try it out and give me some feedback. If it works well and folks want to use it, I'm willing to keep the server up simply for the cost of operation/bandwidth. For now though I could use some more test subjects.

    If you'd like to set up your Google Voice lines as SIP trunks and forgo the Google Voice module on Asterisk altogether, whether because it's been problematic for you or for any other reason, give it a try:

    https://simonics.com/gvgw/

    (SSL certificate is a CA Cert. Information entered on the site is encrypted.)
     
  2. rossiv

    rossiv
    Expand Collapse
    Guru

    Joined:
    Oct 26, 2008
    Messages:
    2,639
    Likes Received:
    136
    Your cert is invalid. Not issued by trusted CA.
     
  3. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    OK, I upgraded to a Comodo cert. Have at it.

    By the way, CACert, which is what I had on there, is great for free SSL certificates. (www.cacert.org) I always configure my FreePBX web sites to use SSL with a CACert certificate. Even if you only use FreePBX on your intranet, it makes sense to me to use SSL when you're performing administrative tasks through any web interface. Can't beat the price. And you just install the CACert root certificate into your browser so that validation passes. This way you don't have to get an alarm every time you go to your own self-signed SSL web sites.
     
  4. kevinfvc

    kevinfvc
    Expand Collapse
    Member

    Joined:
    Apr 11, 2008
    Messages:
    132
    Likes Received:
    2
    If we want to test this GV-SIP gateway we enter our login and password? I'm not sure I feel comfortable with that, personally. Is this something you can package up, so we can try on our own server, perhaps?
     
  5. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    I understand your concern. It'd be great if Google had some sort of auth API for Talk/Voice that would let you delegate access without turning over user/pass credentials, but unfortunately they do not.

    I don't have anything that can be deployed locally. Depending on your network topology, though, it may not benefit you in a local deployment. One of the problems being solved is that, aside from Asterisk sometimes being flaky about whether it wants to talk to Google on a certain day, NAT and firewall configs can foil the connection. This gateway is out on the public Internet without NAT (but properly firewalled). That's the main benefit to me for my home system, anyway.
     
  6. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    tutorial

    Anyone curious about how it works before signing up, I have created a small help/tutorial page with screenshots. http://simonics.com/gvgw/help/
     
  7. wardmundy

    wardmundy
    Expand Collapse
    Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    11,200
    Likes Received:
    1,495
    Looks awesome :clapb:
     
  8. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    New feature: CNAM lookup

    New feature to the gateway: CNAM (Caller ID name) lookup.

    Incoming calls from your Google Voice number will now show the Caller ID Name that is looked up, or "GoogleVoice" if no name is available.

    It's working great... give it a try if you like.
     
  9. TheMole

    TheMole
    Expand Collapse
    Guru

    Joined:
    Aug 28, 2008
    Messages:
    96
    Likes Received:
    9
    Would you mind giving us a summary of the technology behind it?
     
  10. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    Yate does the GVoice/SIP interworking and routes the calls.

    A custom script performs CNAM lookups on incoming calls and adds the name to the caller ID.

    The server has no NAT to potentially mangle up RTP. Yate is very good at detecting and dealing with NAT at the far end.

    I wrote a set of scripts to connect from the web server to the gateway to set up and remove GVoice accounts and SIP registratons.
     
  11. tiggerpaws

    tiggerpaws
    Expand Collapse
    Member

    Joined:
    Feb 6, 2011
    Messages:
    105
    Likes Received:
    6
    there is no cnam option on the site.
     
  12. rossiv

    rossiv
    Expand Collapse
    Guru

    Joined:
    Oct 26, 2008
    Messages:
    2,639
    Likes Received:
    136
    What do you mean by CNAM? Inbound or outbound? GV won't let you set outbound. While I haven't used the OP's service, it should pass inbound CID to your * server.
     
  13. tiggerpaws

    tiggerpaws
    Expand Collapse
    Member

    Joined:
    Feb 6, 2011
    Messages:
    105
    Likes Received:
    6
    Oh poop, then my browser is boogered.
     
  14. tiggerpaws

    tiggerpaws
    Expand Collapse
    Member

    Joined:
    Feb 6, 2011
    Messages:
    105
    Likes Received:
    6
    However, I tested the service and
    get good outbound calls, but no
    inbound, it just goes to gvoicemail.

    I put that code in my extensions conf thing
    and no effect.

    Also if I accidentally hit a DTMF
    button, my phone is muted for the
    duration of the call.
     
  15. tiggerpaws

    tiggerpaws
    Expand Collapse
    Member

    Joined:
    Feb 6, 2011
    Messages:
    105
    Likes Received:
    6
    Wait, I understand now, this is for
    OUTGOING calls only.

    Ok it is not for incoming calls.

    It is a good outgoing call service.
     
  16. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    tigger, it works for both inbound and outbound calls. If your calls are hitting Google Voicemail without ringing your phones/IVR/etc. you either did not register to the switch or you have a misconfiguration on your PIAF box, probably in the trunk or inbound route setup. Review your asterisk logs to see. Include "insecure=port,invite" in your trunk definition if you don't have the global "Allow anonymous SIP" turned on.

    CNAM is looked up on all inbound calls from Google Voice through the gateway and delivered to you. This is a free, bonus feature. There is no place for you to enable or disable it.
     
  17. tiggerpaws

    tiggerpaws
    Expand Collapse
    Member

    Joined:
    Feb 6, 2011
    Messages:
    105
    Likes Received:
    6
    Ok, I put the insecure=port,invite in my incoming
    part of the trunk, I have google voice settings to
    "google chat".
    Incoming Settings

    USER Context: <username>

    My incoming settings are as such:
    host=gvgw1.simonics.com
    username=xxxxxxxx (privatised on the board)
    secret=xxxxxxxx
    type=user
    context=from-trunk
    insecure=port,invite

    My outgoing settings work fine with one
    tiny bug pressing a dtmf key by mistake
    mutes my call permenently for durations
    of the call, so maybe I got something
    boogered up in there, so here are the
    settings:

    Outgoing Settings

    Trunk Name: PEER Details: host=gvgw1.simonics.com
    username=xxxxxxxxxxxxx
    secret=xxxxxxxxxxxxx
    type=peer


    Also I typed in that line at the
    end of my extensions_custom.conf file

    [custom-gv-answer]
    exten => _.,1,Answer()
    exten => _.,n,Goto(from-pstn,${EXTEN},1)

    Hmmm still does not ring anything here,
    saw nothing on the cli about an incoming
    call trying to get in.

    What did I booger up?

    More info at request
     
  18. billsimon

    billsimon
    Expand Collapse
    Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    530
    Likes Received:
    146
    Get rid of that whole incoming block. Make it empty. Not used.

    In the peer settings define host, username, secret, type=peer, and insecure as you have them. Set the context to the custom context you defined (custom-gv-answer) instead of from-trunk.

    Register to the switch by defining a registration string with your DID at the end, e.g. username:password@host/GVNUMBER
     
  19. tbrummell

    tbrummell
    Expand Collapse
    Guru

    Joined:
    Jan 8, 2011
    Messages:
    427
    Likes Received:
    18
    Thanks for this Bill, just set it up to take it for a spin. Works just fine. :)
     
  20. tiggerpaws

    tiggerpaws
    Expand Collapse
    Member

    Joined:
    Feb 6, 2011
    Messages:
    105
    Likes Received:
    6
    No incoming calls on this test,
    tried 3 times still gings and goes
    to voice mail.

    Settings are now:
    Outgoing Settings

    Trunk Name: PEER Details: host=gvgw1.simonics.com
    username=GV1316XXXXXXX
    secret=PRIVATISED
    type=peer


    Incoming Settings

    USER Context: USER Details:
    Blank as you told me.


    Register string isi:
    GV1316XXXXXXX:pRIVATISED@gvgw1.simonics.com/GV1316XXXXXXX
     

Share This Page