1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Check out the 6 new Certified Incredible PBX Builds for Asterisk 11 and 13 featuring CentOS 6, Ubuntu 14, Raspberry Pi 2, and Asterisk-NOW.
    Dismiss Notice

R.I.P. Replacing Google Voice in PIAF, Goodbye Google

Discussion in 'Open Discussion' started by Porch, Jul 6, 2013.

  1. Porch

    Porch Guru

    I use Google Voice a lot. It's my primary number for my cell and I don't have a landline. Google has been ticking me off lately. Voice has not been updated in years and the Android app is spotty. New voicemails take hours to show up, even tho the text transcriptions take seconds. And when I do hit play on a VM, it will often refuse to play. If my phone is on Edge, and it is a lot do to my area, it's near worthless. I can't even call out using my GV number most of the time.
    Google Voice it looking to be abandoned, or possibly rolled into another service like Hangouts. And I don't believe the transition to Hangouts will carry the features I want, or let me sign up without having a Google+ account with my full name as a requirement.

    I could type a full paragraph here on privacy and personal data, but we all know the arguments. Lets just say I want all my data off the cloud.

    I have setup a PIAF phone system for a client before and I think know enough to set one up for myself and make it do everything on my must have list, but I wanted to start a thread to get any suggestions from the group here.

    I was planning to setup PIAF to forward any incoming calls to my cell, and if I don't answer, then send it to PAIF voicemail. Simple. I don't want to only use a SIP client for calling because they don't work well with poor cell coverage. I don't talk much on the phone, about 1 hour a month, so I never go over my minutes. I have unlimited data and sms that I do use that a lot.

    Here is my features list for items I am unsure about. Any suggestions would be great.

    1) Keep my existing GV number. And make calls in and out of it with it displaying my GV number in the caller ID.
    Looks like I can port my GV number to a SIP provider, so that should not be an issue. But I just may use GV ring-all-numbers for now.

    2) Dial out from my GV number with no data connection on my cell.
    I am assuming I can dial into my PBX, then dial out from it. This needs to be easy. When I dial a number. GV ask me if I want to use GV to dial out. I want something like that. I am assuming I can use some sort of dialing card app for automatic dialling my PBX and then dialling the number I want.

    3) Visual voiemail.
    I really like how GV does voicemail. I would love to find an app, or just a web interface that I can do the same. I know Text-2-speach is not going to happen, but seeing a list of who called and pressing play to hear the message would be nice.

    4) SMS.
    I need a interface for receiving/sending sms. I have never tried this before. Suggestions?
    Also, forwarding all sms to my phone number.

    5) Calls forwarded from the PBX, should have the callers ID on it.
    I want to know who is calling, not that my PBX is calling me.

    6) Voicemail notifications over sms.
    No email. It takes to long and only works if I have a solid data connection.

    7) Contacts syncing.
    I would like to get this off Google. I use Thunderbird now for email and having it sync contacts to my phone without using google would be great.

    PAIF is installing now on an older Atom box for this project. I have a good fios line I can plug it into with a static IP, not firewall. I am assuming PAIF has good security that I don't need a hardware firewall and have to mess with SIP and port forwarding.

    Any suggestions or comments would be great.
  2. rossiv

    rossiv Guru

    Replies in red.
  3. Porch

    Porch Guru

    Thank you for all the advice. That's a good start down the direction I want to go.
    But something is worrying me now. You said some DID support SMS. If I port my phone number from GV to a provider, will SMS still work?

    And what can I use for an SMS interface to send and receive messages? I would prefer something web based.
  4. Vince Novak

    Vince Novak New Member

    I'm a complete Noob at this so take what I say with a grain of salt.

    The SMS portion I think is going to be controlled from your provider so that's something your going to have to research with them. I don't know of a PBXiAF feature that directly controls SMS, though if there is one I'd be interested in playing with it.

    As far as syncing contacts go you could setup an LDAP server on your PBXinAF box and then sync it to your Asterisk contacts. I'm just tossing out an idea I don't know if there is an easy way to sync the two though I suspect there is.

    You would then have to make a decision as to if you wanted to allow syncing when you were not at home since allowing it to sync from the internet would require you to expose your box to the internet a little so you have to decide if the possible security issue would be worth the added convenience.

    I'm sure smarter minds than mine will pipe in with some better thoughts or reasons why this is a horrible idea but that's the best way I can think of to get it done.

    I use Google Voice as my provider but I just use them for the phone service and occasional SMS. My asterisk box handles all the voice-mails, call forwarding, etc. I'm debating switching off to someone else but to be honest GV has always worked relatively painlessly for me and it's hard to argue with free.
  5. Porch

    Porch Guru

    When I figure out SMS and address book sync, I will post. There seems to be some LDAP syncing utilities out there.

    TravelinMan 3 is near perfect, with one flaw. It uses an outside service like dynaip for keeping track of the IP address of the phone. I don't want to depend on an outside service for privacy reasons. So time to do some coding and invent my own DDNS service.
    Here is how I did it.

    1) Install thttpd. Configure it to some high strange port. Make sure to poke a hole in the firewall for too.
    2) Configure it to allow cgi scripts to run.
    3) Make this bash script and put it into thttpd directory. Call it something like poke.cgi. Going to need a different one for each user.

    echo -e "Content-type: text/html\n\n"
    echo good
    echo $REMOTE_ADDR
    sed -i '/porch.pbx.local/ c\'$REMOTE_ADDR' porch.pbx.local' /var/www/thttpd-temp/users

    4) Create the /var/www/httpd-temp/users directory and file and chmod the file to thttpd r+w. The contents should be something like this. You will have to add an initial line for each user. Yes, this will be the hosts file. porch.pbx.local admin.pbx.local pbx.local localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1 pbx.local localhost localhost.localdomain localhost6 localhost6.localdomain6

    6) Now when you browse to http://ip:highport/poke.cgi the script should update the users file with your ip address.
    7) Download this app on your phone. https://play.google.com/store/apps/details?id=org.l6n.dyndns
    8) In the host or IP address option in the configuration, change it to http://ip:port/poke.cgi
    9)Then make sure it updates correctly.
    10) backup the original /etc/hosts file and then symlink /var/www/httpd-temp/users to /etc/hosts

    Now to configure TravelinMan3 to quit bugging the dns and lookup the ip address from the host file.

    11) in add-fqdn, change.
    iptest=`nslookup $2 | tail -2 | cut -f 2 -d " " | head -n 1`
    iptest=`fgrep $2 /var/www/thttpd-temp/users | tail -2 | cut -f 1 -d " " | head -n 1`

    12) in ipchecker, change.
    test=`dig +short $fqdn`
    test=`fgrep $fqdn /var/www/thttpd-temp/users | tail -2 | cut -f 1 -d " " | head -n 1`

    Then configure TravelinMan3 like normal.
    Now I have an internal DDNS system to keep track of the clients with minimal Internet foot print.
    wardmundy likes this.
  6. Porch

    Porch Guru

    My modified version of TravelinMan3 is working wonderfully. I got a Box sitting up on a Fios line with an account from voip.ms working well.
    I got a sip client on my phone working better then expected. I might use then when I am at home. Follow me is set to try my sip client first, the dial my cell phone. It works well and CID even gets passed.

    Now on to the DISA stuff.
    I have an inbound trunk set to drop me to a DISA if my CID is that of my cell phone. Then I can dial out and have my CID be anything I want.
    The task is finding a Calling Card app that will make it function the way GV does.
    Using the built in dialer, I want it to ask me if I want to use the PBX to dial, or dial direct. Or even if I have the sip client open, use that.

    So far the only app I found that works perfect is International Dialer. It's dead simple, works unlike the other 5 apps I have tried.
    Only problem is the war that brakes out between International Dialer, and CSipSimple. with clicking on a contact, International Dialer runs first. Then CSip. If you tell ID to use the DISA PBX, it remembers it for next time. The next time you click contact, ID puts the long phone number in by itself, then passed on to the CSip or Direct box. At that point, you can only dial the PBX DISA number.

    I need to find a way to have CSip get the OutgoingCall intent first, before DI. Or some other way to do this.

    Working through the bugs.
  7. Porch

    Porch Guru

    On to the next problem. Voice Mail.

    It looks like to listen to voice mails requires a plugin of some type for the browser. I can't get it to work on Firefox or Chrome.
    It does not work at all on my android phone. I can download and listen to them, but that's several extra steps.

    When I installed it at the business, I bought FOP2 for them and it has a flash plug-in that works, but I would rather not have to use flash on my phone.

    Any suggestions?
  8. wardmundy

    wardmundy Nerd Uno

    Be really careful doing this. Remember, almost anybody can spoof your Caller ID. So the only thing standing between you and a HUGE PHONE BILL is somebody knowing your two phone numbers. We've always slept better with a password in the middle as well.
    exten => s,n,Background(enter-password)
    exten => s,n,Read(MYCODE,beep,7)
    exten => s,n,GotoIf($["${MYCODE}" = "90210"]?disago:bad,1)
  9. Porch

    Porch Guru

    I have it set to require a pin number. Thanks for advise.

    After much playing around, I found that installing K-9 and having my VM emailed to a IMAP account is the best way to get a Visual Voicemail interface. I can click the Show Attachment button and it plays the voicemail in Music.
    The only big problem is the email subject is not very descriptive. "New message 4 in mailbox". Having the caller ID in the subject would be much better.
    Better yet, having it connect to my address book and show me the callers name.
  10. lgaetz

    lgaetz Pundit

    Check out FreePBX, Voicemail Admin, Settings, emailsubject. Mouseover help is not too descriptive, but I am pretty sure you are able to use Asterisk variable definitions with this setting. Something like:

    emailsubject:  "New voice mail from ${CALLERID(name)} at ${CALLERID(num)}"
    Not for the first time, I'm off base with my suggestions. Responses below offer fixes.
    randy7376 and gordon like this.
  11. randy7376

    randy7376 Guru


    If you add the variable ${VM_CALLERID} into your subject line, it will then display the Caller ID information when you receive an e-mail.

    Go to Voicemail Admin -> Setttings and add the following to emailsubject:
    [PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX} from ${VM_CALLERID}
    Modify it to suite your needs.

    EDIT: Lorne and I are sometimes on the same wavelength, hehe! ;)
    lgaetz likes this.
  12. gordon

    gordon Member

    I was wondering how to do this as well. The CALLERID variable doesn't appear to be set. However, I found the variables that are: https://wiki.asterisk.org/wiki/display/AST/VoiceMail+Channel+Variables

    I've also added ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)} to the subject as well.
    lgaetz likes this.
  13. tm1000

    tm1000 Schmoozecom INC/FreePBX

    It will only work in safari. You can thank the discrepancies in webkit for that one. Sorry. We will most-likely go to HTML5 in 2.12 which will negate any browser issues.

    PBX@Home and Huckda like this.
  14. Porch

    Porch Guru

    Status Update.

    1) Caller ID is working fine. I see peoples CD on my phone when they call the PBX. Not tried every use case, but it appears to just work.

    2) DISA is working. I have to turn the app on when I want to use it. A bit clunky, but I don't call a lot, so it works.

    3) SMS over VOIP seems to be in the beginning stages. voip.ms has a web panel and they will email you the messages and when you reply, they will be sent back. Not half bad, but I can't find a way to send a new sms from the phone. Vitelity says they have an android app to handle SMS. As of right now, voip.ms says if you port a number over, it will not have SMS compatibility.

    4) IMAP push seems to take only a few minutes. So emails sent to an IMAP account, appear on my phone shortly. The message appears as an attachment and I can play it back fairly reality. CID needs to be connected to my address book tho.

    5) Speaking of address book, I have yet to find anything that will sync Android to an address book PIAF will look up the CID from. Least without using an outside cloud.

    The surprising part so far is SIP. I have better wireless access in most places I work then I do have cell access. So placing a call over SIP might give me better quality then making a call over the cell network.
    My big problem seems to be with the CSipSimple app. It's none too reliable and I get no audio often.
  15. wardmundy

    wardmundy Nerd Uno

  16. Porch

    Porch Guru

    I found SipDroid to work well. It even has a call redirect thing that will do DISA if the connection is gone. Well, sort of. It works if I set SipDroid to always use it for dialing. If I have it ask me, and I am off wifi, then that feature goes away. So many bugs, so little time.

    Now I have a question on call routing/forwarding. With GV, if someone calls my cell number, it forwards it to GV if I don't answer. GV them drops it to voicemail.
    If I set my phone to forward all unanswered calls to PIAF using short codes, PIAF assumes it's just a normal call and rings my extension.

    So how does GV tell if they are getting a forwarded call my my cell (and direct it to voicemail) or someone is calling the number direct (and ring my phone)?
  17. Porch

    Porch Guru

    Too add to the GV strangness.

    If I call my DID number from an outside phone, I get the waiting music of the call group as PIAF calls my extension, then my cell number.
    If I call my GV number (that is set to forward calls to the same DID number) I never get the MOH, but PAIF calls my extension, then my cell like normal.
    Looking at the logs, both times it starts ring group 600 and plays the music, but GV appears to be blocking it.
    Question is, how does it know?
  18. tm1000

    tm1000 Schmoozecom INC/FreePBX

    Are you sending the calls to google voicemail? Did you check that box in the web GUI when you added your account. If you checked that box then asterisk does not "answer" the channel until a device picks it up. If asterisk answers the channel it can never route back to google voicemail.
  19. Porch

    Porch Guru

    I am trying to get away from Google Voicemail. Until I can port my GV number, I have set GV to forward all calls to my DID number. PIAF is setup to send that DID into a call group that plays moh as it tries a few numbers to locate me. If it can't, it goes to PIAF VM. At no point do I want to use GV voicemail.

    My thought to stop it from going to GV voicemail in 25 seconds, is to answer the phone and play moh as part of the ring group. GV will think the phone has been answered.
    But that does not happen. The MOH never plays and I hear ringing. I can pick it up at my extension and that works.

    In short. If I call my DID, I hear the MOH and everything works correctly. If I call my GV number that forwards to my DID, I don't hear my moh, but everything still works.
  20. Porch

    Porch Guru

    So I found the answer.

    On the incoming route "Pause Before Answer" has to be set to at least 2.
    The incoming route has to goto an announcement first. I have one with a 0.5 second of silence and it seems to work fine.
    After that, I route to a Ring Group with moh.

Share This Page