-1

Please tell me how to send commands (e.g.: sip show peers) via asternet (c#). Any help or link will be highly appreciated.

Like:

AsterNET.Manager.Response.ManagerResponse response = SendAction("sip show peers");
miken32
  • 42,008
  • 16
  • 111
  • 154
hmak.soft
  • 59
  • 1
  • 10

1 Answers1

0

"sip show peers" is COMMAND.

You have send action COMMAND.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_Command

arheops
  • 15,544
  • 1
  • 21
  • 27
  • Thanks for the prompt reply. But I want to ask how to do this in c#. Can you please show me some code snippets or links. – hmak.soft Sep 21 '16 at 14:21
  • I was juggling around for more than two days but can't find a way to do some action (ask some commands as we asked with putty). Any help would be highly appreciated. I want to do this in my c# code. – hmak.soft Sep 21 '16 at 14:23
  • Above unswer have all info you requested. Acordinly to SO rules you have do some efforts yourself – arheops Sep 21 '16 at 20:12
  • 1
    AsterNET.Manager.Action.CommandAction cmdAction = new CommandAction(); cmdAction.Command = txtCommand.Text;//"core show channels"; response = manager.SendAction(cmdAction); – hmak.soft Sep 28 '16 at 10:42