public bool Forward(string caller, string destination) { TapiAddress ad = GetAddress(caller); bool success = false; if (ad != null) { if (destination != "") { log.Debug("Unconditional forward from " + ad.ToString() + " to " + destination); ForwardInfo[] fis = new ForwardInfo[1]; fis[0] = new ForwardInfo(ForwardingMode.Unconditional, "", 0, destination); log.Debug("Forwarding " + ad.ToString() + ": " + fis[0].ToString()); try { MakeCallParams mcp = new MakeCallParams(); mcp.NoAnswerTimeout = 0; if (ad.Forward(fis, 3, mcp) != null) { success = true; } } catch (Exception e) { log.Error("Unable to forward " + ad.ToString() + " " + e.Message); } } else { ad.CancelForward(); success = true; } } return(success); }
public bool Forward(string caller, string destination) { TapiAddress ad = GetAddress(caller); bool success = false; if (ad != null) { if (destination != "") { log.Debug("Unconditional forward from " + ad.ToString() + " to " + destination); ForwardInfo[] fis = new ForwardInfo[1]; fis[0] = new ForwardInfo(ForwardingMode.Unconditional, "", 0, destination); log.Debug("Forwarding " + ad.ToString() + ": " + fis[0].ToString()); try { MakeCallParams mcp = new MakeCallParams(); mcp.NoAnswerTimeout = 0; if (ad.Forward(fis, 3, mcp) != null) { success = true; } } catch (Exception e) { log.Error("Unable to forward " + ad.ToString() + " " + e.Message); } } else { ad.CancelForward(); success = true; } } return success; }