Esempio n. 1
0
 public Task Hangup(HangupCause hangupCause = FreeSwitch.HangupCause.NormalClearing)
 {
     return
         (RunIfAnswered(
              () =>
              eventSocket.SendApi("uuid_kill {0} {1}".Fmt(UUID, hangupCause.ToString().ToUpperWithUnderscores())),
              true));
 }
        public static Task <CommandReply> Hangup(
            this EventSocket eventSocket, string uuid, HangupCause hangupCause = HangupCause.NormalClearing)
        {
            if (uuid == null)
            {
                throw new ArgumentNullException("uuid");
            }

            return
                (eventSocket.SendCommand(
                     "sendmsg {0}\ncall-command: hangup\nhangup-cause: {1}".Fmt(uuid, hangupCause.ToString().ToUpperWithUnderscores())));
        }
Esempio n. 3
0
        public static Task<CommandReply> Hangup(
            this EventSocket eventSocket, string uuid, HangupCause hangupCause = HangupCause.NormalClearing)
        {
            if (uuid == null)
            {
                throw new ArgumentNullException("uuid");
            }

            return
                eventSocket.SendCommand(
                    "sendmsg {0}\ncall-command: hangup\nhangup-cause: {1}".Fmt(uuid, hangupCause.ToString().ToUpperWithUnderscores()));
        }
Esempio n. 4
0
 public Task Hangup(HangupCause hangupCause = FreeSwitch.HangupCause.NormalClearing)
 {
     return
         RunIfAnswered(
             () =>
             eventSocket.SendApi("uuid_kill {0} {1}".Fmt(UUID, hangupCause.ToString().ToUpperWithUnderscores())),
             true);
 }