AsterNET VB.NET
See original GitHub issueHi guys, Everything that I find is for AsterNET on C(++) It is a little hard for me to translate from C to VB.net Can I get some help with VB.NET? Here are my issues:
- Trying to get exten to call another exten
C code:
mConnection.SendAction(new OriginateAction()
{
Channel = "SIP/401",
Exten = "201",
Context = "default",
Priority = "1",
CallerId = "401"
Timeout = 3000000
});
VB.NET code:
Dim test As New Action.OriginateAction
test.Channel = "SIP/3000"
test.Exten = "2035"
test.Context = "default"
test.Priority = "1"
test.CallerId = "3000"
test.Timeout = 3000000
conn.SendAction(test)
Exten 3000 gets a call, when answering, 3000 calls 2035 But when 3000 doesn’t answer in the “timeout” time (or even after 5 sec), I get a TimeoutException was unhandled error. (I’m not getting this error when Exten 3000 is set to “auto answer”
- I’m trying to send a command and put the results in a TextBox (lets say “sip show peers”)
Dim a As New Action.CommandAction("sip show peers")
conn.SendAction(a)
This works fine, but I can’t get the response to go into the TextBox
This is what I have so far:
Dim r As Response.ManagerResponse = conn.SendAction(a)
or
MsgBox(conn.SendAction(a))
or
TextBox1.Text = r.Response(a)
But no luck…
Issue Analytics
- State:
- Created 7 years ago
- Comments:10
Top GitHub Comments
What values are you defining in the
OriginateAction
? And which line is giving the error? What is the full error message/exception?See the Asterisk documentation maybe. Here: https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_Originate
AsterNET is just a client framework, it’s not a phone system. AsterNET just communicates with Asterisk using AMI.