Unfortunately, there is not much documentation regarding the AsterNet library, so the code snippet below might help someone who simply wants to abort an incoming or outgoing call, e.g. via a C# .Net button.

Basically this is quite simple, you only have to remember the current channel ID; it is not enough to create a HangupAction with your SIP number as parameter.

In your constructor method, create “global” ManagerConnection instance. Example:

 

Handle manager.NewChannel event (replace “userrow.number” with the personal number of the current user, you might get it via Active Directory or your preferred user database):

Create a button and handle the Click event:

 

  [email protected]