Hi there, I like to hobby a little bit with Ruby as a noob.
I am trying to construct a script to forward calls if my internet is down.
It should forward to two phone numbers simultaneously, the second one with a delay (although not stopping the first one as in the blog example).
I got so far:
sys.Log("call from #{req.Header.From.FromURI.ToString()} to #{req.URI.User}.")
if sys.In then
sys.Log(”isavailable=#{sys.IsAvailable().ToString()}.”)
if sys.IsAvailable()
# do nothing, provider is also logged in on the ATA
else
sys.Dial(”0031123456@Voipcheap&003162345678@Voipcheap”)
end
else (.. outbound)
I cannot get passed the "updating, please wait" screen.
Apparantly, the test sys.IsAvailable cannot be interpreted?
Also, I do not know how to build in the delay for the second number (my mobile) over the first number (my wife's number). Maybe I overlooked this.