Do not use 11 digits numbers for IPkall or IPcomms "I don't know why but it works better"
Just make sure you press the asterisk key on your phone while the phone is ringing, the fist ring
is usually generated by Sipsorcery.Then dial in your pin when asked and the number "1" to check
you Voice Mail.
Code: Select all
##############################################################
######## OUTBOUND CALL FROM GOOGLE VOICE & VM Check ##########
##############################################################
#Logic for routing outgoing calls.
GV1_email = "me1@gmail.com"
GV1_pwd = "yourpass"
GV1_nbr = "^(7865551212)"
SIPnum1 = "6035551212" # Ipcomms DID
GV2_email = "me2@gmail.com"
GV2_pwd = "yourpass"
GV2_nbr = "^(3055551212)"
SIPnum2 = "2065551212" # IPKall DID
sys.Trace = false
case req.URI.User
############# Checking VM on your different GV accounts ##############
#Speed Dials (star+number)
#For GV Voicemail: Hold star key during call-in to stop ring & gain access
when /^\*786|7865551212/ # GV Voicemail in Miami
sys.GoogleVoiceCall(GV2_email,GV2_pwd,SIPnum2,"7865551212",".*",1)
when /^\*619|6195551212/ # GV Voicemail in CA
sys.GoogleVoiceCall(GV2_email,GV2_pwd,SIPnum2,"6195551212",".*",1)
when /^\*815|8155551212/ # GV voicemail in Chicago
sys.GoogleVoiceCall(GV2_email,GV2_pwd,SIPnum2,"8155551212",".*",1)
############# Regular Google Voice Call ##############
when /^/
sys.GoogleVoiceCall(GV1_email,GV1_pwd,SIPnum1,"#{req.URI.User}",".*",1)
sys.Log("Sorry, Google Voice Call failed.")
end
gvtricks