Thread: inbound routing
View Single Post
Unread 11-17-2010, 03:42 AM   #2
Join Date: Jul 2007
Location: Toronto, Canada
Posts: 1,422
Thanks: 123
Thanked 369 Times in 282 Posts
emoci is a name known to allemoci is a name known to allemoci is a name known to allemoci is a name known to all

The forwarding feature just does not support that type of of forwarding (Forward if Unavailable) at the moment.

My suggestion... if you have a SipSorcery acct. ... is to use something like:

sys.log("***Starting New Call Event***")

sys.log("***Incoming Call Starting***")
sys.log("Incoming Call From  #{req.Header.From.FromName} at #{req.Header.From.FromURI.User}@#{req.Header.From.FromURI.Host}")
sys.log("Call is for #{req.URI.User}")
cid = req.Header.From.FromURI.User
trunk = req.URI.User
sys.log("*** CID: #{cid} ***")
sys.log("*** Trunk: #{trunk} ***")

#****Have Calls Ring ATA or Forward if Offline****

sys.Log("Accepting Call") 
      if sys.IsAvailable() then 
             sys.Log("The ATA is online.") 
            sys.Log("The ATA is off-line.") 
For this to work... you would need to simultaneously register to both VoXalot and SipSorcery ... and when disconected be disconnected from both (after all SipSorcery can't exactly check that you're connected to VoXalot).

If it sees you're connected... it'll send your calls to VoXalot SIP URI... if not connected it'll use VoXalot (you'll have to add it as an outgoing provider in SipSorcery) to dial your cell/landline number (as per your Smart Call/Dial plan).

The only other reliable (cheap but not free) alternative I know that'll do what you want, is (about 25 cents/month and 0.1 cents/min for incoming)
emoci is offline   Reply With Quote