回複:一個dialplan可以同時用於in和out,in放前麵,out放後麵

來源: xialele 2011-08-04 19:53:09 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (1031 bytes)

Thanks for fitwxc's post. The out works, but the in does not work for me. After doing some search, I did some modification to the post and both in and out works. The change is to remove all the in related, add a check for sys.Out, do the out, else do the in. It is posted bellow.

Don't know why the original does not work. I also don't understand what this line mean

sys.Dial("VoipDiscount")  

 

--------

#outbound call processing

if sys.Out

case req.URI.User

when /^1?\d\d\d\d\d\d\d\d\d\d$/ then

sys.Googl....

sys.Respond(480, "#{sys.Username} Not available")

when /^\+\d{3,}/,/^00\d{3,}/,/^011\d{3,}/ then

sys.Dial("VoipDiscount")  

sys.Respond(480, "#{sys.Username} Not available")

else

sys.Respond(480, "#{sys.Username} Not available")

end

else          # sys.Out

   sys.Dial "#{sys.Username}@local"

end

所有跟帖: 

你的情況根本不需要in部分,in選空就行了。 -fitwxc- 給 fitwxc 發送悄悄話 fitwxc 的博客首頁 (0 bytes) () 08/04/2011 postreply 20:34:30

請您先登陸,再發跟帖!

發現Adblock插件

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

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

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

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