回复:一个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

请您先登陆,再发跟帖!