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

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

請您先登陸,再發跟帖!