Thank you so much, more questions.... 回複:See inside

來源: Rosefit 2010-07-12 15:27:07 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (2217 bytes)
Thank you so much for help.
I have the following dial plan in sipsersory as default, and works very well when call USA.

My questions are:

1) Should I creat a new plan and set name as 'Out Dial Plan'?
2) How I can tell the "Out Dial Plan" my GV information and my nonoh information?

Sorry I am a new beginner, many thanks again for help.


AREA_CODE = '717' # my area code
GV_USER = 'username@gmail.com' # my GV e-mail address (user@gmail.com)
GV_PASS = 'GV password' # my GV password
CB_NUMBER = '1aaaxxxyyyy' # my 11-digit SIP number (only one)

SPEED_DIAL = { # my speed dial numbers
'1' => '19879879876', # Mom
'123' => '12345678901', # Work
'45' => '17479876543', # Gizmo BFF
'411' => '8004664411', # Google 411
'266' => '4153767253@podlinez.net', # CNN Headlines
}

begin
sys.Log "** Call from #{req.Header.From} to #{req.URI.User} **"

if sys.Out # if outbound call
num = req.URI.User.to_s # Get a string copy of the number to dial

num = SPEED_DIAL[num] || num # Substitute with speed dial entry, if any

case num
when /@/ then sys.Dial num # URI dialing
when /^[2-9]d{6}$/ # Local call, 7-digit number
num = '1'+ AREA_CODE + num # prefix it with country and area code
when /^[01]?([2-9]d{9})/ # US number with or without country code
num = '1' + $1 # add country code and truncate number to 10-digit
when /^(011|00|+)(d{10,})/ # international number
num = '+' + $2 # GoogleVoiceCall works with '+' prefix only


else sys.Respond 603, 'Wrong number, check & dial again'
end

sys.Log "Calling #{num} via Google Voice"
sys.GoogleVoiceCall GV_USER, GV_PASS, CB_NUMBER, num, '.*', CB_NUMBER =~ /^1747/ ? 7 : 1, 30

else # sys.Out
sys.Dial "#{sys.Username}@local"
end

rescue
sys.Log("** Error: " + $!) unless $!.to_s =~ /Thread was being aborted./
end

所有跟帖: 

it may be something like this -沙漠荒野- 給 沙漠荒野 發送悄悄話 沙漠荒野 的博客首頁 (994 bytes) () 07/12/2010 postreply 19:20:11

Thank you so much, I will try.. 回複:it may be something like thi -Rosefit- 給 Rosefit 發送悄悄話 (265 bytes) () 07/13/2010 postreply 09:05:38

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”