Exemple #1
0
        public bool IsExtensionLive(sDomainExtensionPair extension)
        {
            //patched to use to sofia_reg_count command instead of a more complicated command for ease of use, return 0 for not registered or 1+ for an extension being registered
            string apiRes = _IssueAPICommand(string.Format(REGISTRATIONS_CHECK_COMMAND, extension.Extension, extension.Domain), true);

            return(int.Parse(apiRes) > 0);
        }
Exemple #2
0
        public int CompareTo(object obj)
        {
            sDomainExtensionPair dep = (sDomainExtensionPair)obj;

            if (dep.Domain == Domain)
            {
                return(Extension.CompareTo(dep.Extension));
            }
            return(Domain.CompareTo(dep.Domain));
        }
Exemple #3
0
 public SocketEvent Deflect(sDomainExtensionPair extension, bool eventLock)
 {
     return(ExecuteApplication("deflect", "sip:" + extension.Extension + "@" + extension.Domain, eventLock));
 }
Exemple #4
0
 public void AttendedTransfer(sDomainExtensionPair extension, bool eventLock)
 {
     ExecuteApplication("att_xfer", "user/" + extension.Extension + "@" + extension.Domain, eventLock);
 }
 public SocketEvent Voicemail(string context, sDomainExtensionPair extension)
 {
     return ExecuteApplication("voicemail", context + " " + extension.Domain + " " + extension.Extension, true);
 }
 public void AttendedTransfer(sDomainExtensionPair extension, bool eventLock)
 {
     ExecuteApplication("att_xfer", "user/" + extension.Extension + "@" + extension.Domain, eventLock);
 }
Exemple #7
0
 public void ConferenceSetAutoCallExtension(sDomainExtensionPair extension)
 {
     ExecuteApplication("conference_set_auto_outcall", "USER/" + extension.Extension + "@" + extension.Domain, true);
 }
Exemple #8
0
 public SocketEvent BridgeToExtension(sDomainExtensionPair extension, bool eventLock)
 {
     return(ExecuteApplication("bridge", "user/" + extension.Extension + "@" + extension.Domain, eventLock));
 }
 public void Presence(bool set, sDomainExtensionPair extension, string presenceName, string message, bool eventLock)
 {
     ExecuteApplication("presence", (set ? "in" : "out") + " " + extension.Extension + "@" + extension.Domain + " " + (presenceName == null ? "unknown" : presenceName) + (message == null ? "" : " " + message), eventLock);
 }
 public bool IsExtensionLive(sDomainExtensionPair extension)
 {
     //patched to use to sofia_reg_count command instead of a more complicated command for ease of use, return 0 for not registered or 1+ for an extension being registered
     string apiRes = _IssueAPICommand(string.Format(REGISTRATIONS_CHECK_COMMAND,extension.Extension, extension.Domain), true);
     return int.Parse(apiRes) > 0;
 }
 public SocketEvent Deflect(sDomainExtensionPair extension, bool eventLock)
 {
     return ExecuteApplication("deflect", "sip:" + extension.Extension + "@" + extension.Domain, eventLock);
 }
 public void ConferenceSetAutoCallExtension(sDomainExtensionPair extension)
 {
     ExecuteApplication("conference_set_auto_outcall", "USER/" + extension.Extension + "@" + extension.Domain, true);
 }
 public SocketEvent BridgeToMultipleExtensions(sDomainExtensionPair[] extensions, bool sequential, bool eventLock)
 {
     string dstring = "";
     foreach (sDomainExtensionPair sdep in extensions)
     {
         dstring += (sequential ? "," : "|") + "user/" + sdep.Extension + "@" + sdep.Domain;
     }
     if (dstring.Length > 1)
         dstring = dstring.Substring(1);
     return ExecuteApplication("bridge", dstring, eventLock);
 }
 public SocketEvent BridgeToExtension(sDomainExtensionPair extension, bool eventLock)
 {
     return ExecuteApplication("bridge", "user/" + extension.Extension + "@" + extension.Domain, eventLock);
 }
Exemple #15
0
 public void Presence(bool set, sDomainExtensionPair extension, string presenceName, string message, bool eventLock)
 {
     ExecuteApplication("presence", (set ? "in" : "out") + " " + extension.Extension + "@" + extension.Domain + " " + (presenceName == null ? "unknown" : presenceName) + (message == null ? "" : " " + message), eventLock);
 }
Exemple #16
0
 public void SetUser(sDomainExtensionPair extension, string prefix, bool eventLock)
 {
     ExecuteApplication("set_user", extension.Extension + "@" + extension.Domain + (prefix == null ? "" : " " + prefix), eventLock);
 }
 public void Redirect(sDomainExtensionPair[] extensions, bool eventLock)
 {
     string spars = "";
     foreach (sDomainExtensionPair dep in extensions)
         spars += ",sip:" + dep.Extension + "@" + dep.Domain;
     ExecuteApplication("redirect", spars.Substring(1), eventLock);
 }
Exemple #18
0
 public SocketEvent Voicemail(string context, sDomainExtensionPair extension)
 {
     return(ExecuteApplication("voicemail", context + " " + extension.Domain + " " + extension.Extension, true));
 }
 public void ScheduleTransfer(int seconds, sDomainExtensionPair extension, string dialplan, string context)
 {
     ExecuteApplication("sched_transfer", "+" + seconds.ToString() + " " + extension.Extension + "@" + extension.Domain + (dialplan != null ? " " + dialplan + " " + context : ""), true);
 }
Exemple #20
0
 public void ScheduleTransfer(int seconds, sDomainExtensionPair extension, string dialplan, string context)
 {
     ExecuteApplication("sched_transfer", "+" + seconds.ToString() + " " + extension.Extension + "@" + extension.Domain + (dialplan != null ? " " + dialplan + " " + context : ""), true);
 }
 public void SetUser(sDomainExtensionPair extension, string prefix, bool eventLock)
 {
     ExecuteApplication("set_user", extension.Extension + "@" + extension.Domain + (prefix == null ? "" : " " + prefix), eventLock);
 }