Could not originate from VB.NET

Dec 19, 2014 at 4:40 PM
Edited Dec 19, 2014 at 4:41 PM
Hi All,

I made some minor changes to AsterNET to use it with AstmanProxy.
All seems to work well, and in the AsterNet.Winform C# project I placed a button with a OriginateAction behind it. It works well.

In my VB.Net project I create a manager object and the LoginAction, PingAction and NewCallID event works well. Originate however returns an Error. The "Response" is "Action Filtered". I found the program line who generated this in the AstmanProxy source on GitHub, but I think it is indicating failures in general. The Debug output for the "Sent action" seems to be identical.

Any suggestion where to look is very welcome.

My C# code:
        OriginateAction oc = new OriginateAction();
        oc.Priority = "1";
        oc.Channel = "SIP/101";
        oc.CallerId = "Asterisk.net";
        oc.Exten = "0654257368";
        oc.Timeout = 15000;
        ManagerResponse originateResponse = manager.SendAction(oc);
Alternative:
        ManagerResponse originateResponse = manager.SendAction(oc, oc.Timeout);
works also


My VB.Net code:
    Dim OriginateResponse As ManagerResponse
    Dim NewCall As New OriginateAction

    NewCall.Priority = "1"
    NewCall.Channel = "SIP/101"
    NewCall.CallerId = "Asterisk.net"
    NewCall.Exten = "0654257368"
    NewCall.Timeout = 15000
    Try
        OriginateResponse = CTIManager.SendAction(NewCall, NewCall.Timeout)
     Catch ex As Exception
        MessageboxError(ex.Message, "Fout in uitbellen")
    End Try
The Debug output:

Debug:[] ManagerConnection:SendToAsterisk - Sent action : '123' : OriginateAction {Action:Originate; CallerId:Asterisk.net; Channel:SIP/101; Exten:0654257368; Priority:1; Async:false; Timeout:15000}


Thanks for reading !!
Dec 22, 2014 at 10:02 AM
Hi, I've not used AstmanProxy, but if it works in C# but not in VB.NET I can only assume something is being done differently between your two implementations.

Is it possible to debug the messages being received and sent from AstmanProxy? This might help you identify the possible reason. What does "Action Filtered" means in AstmanProxy?

Skrusty.
Dec 22, 2014 at 6:54 PM
Thanks Skrusty
I Agree, but I can not figure out what is done differently. (Code is the same isn't it ?). After some testing the only thing I can imagine is that the OriginateAction class in Vb.Net is different.

Every misformed action (e.g. wrong context) returns the "Action FIltered" message from the proxy. I am convinced it means "not send to Asterisk". I'am not very good at compling en debugging Linux code :-( .

I augmented the Asternet Manager code with a method wich accepts only the necessary OriginateAction properties as strings and does the OriginateAction invocation. Calling this method from VB works well.

Next step is to inspect the passed OriginateAction object in Asternet. If I got results, I will post it.


Jan
Dec 23, 2014 at 11:43 AM
I use asternet with vb.net and have never had any problems.
have you tried to connect directly with the asterisk box (bypassing proxy) and seeing if your code works then?