ASTERISK + AsterNET


#1

hello gentlemen

I have a asterisk server mounted and I am using the asternet component to do the interaction via programming language …
And the following problem occurs: I want to terminate a certain call being made on the dialer

Does anyone know how I can do this?


#2

You need to identify those calls how, You could use the context used to make or receive the calls as an identificator , then use AMI to terminate the calls


#3

If you are managing multiple calls, AMI is likely to be more appropriate, or a combination of that and other technologies.


#4

ambiorixg12, yes when the call is made I am sending ActionId to identify the phone, but what specific command could I use to terminate by the AMI?


#5

Any of these 2 will work
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Redirect

(https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Command)


#6

but in the case of the MenagerAction_Redirect command would the call be redirected to another extension?
my idea would be to end the call of the same identifier


#7

Redirect acction can sedn the call to hangup() app


#8

More precisely an extension consisting of just a call to the hangup app (although just a call to the noop app would actually work just as well).

Having said that, it took me about 10 seconds to find the more direct approach of:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_Hangup


#9

There is no need to even have ActionID for any of the methods mentioned, unless you are sending parallel requests and want to know if any have failed. Generally they would only fail because the channel no longer existed.


#10

the idea later would be to use threads to make multiple calls … but now I think of making the call to a certain phone and I go to a specific extension, if the extension is already in a call, I want to end the other call so it does not point to the extension


#11

I know there was a hangup acction but for some reason I couldnt find it


#12

softhangup is the application for such cases but it required channels information then we can hngup call with AMI connection easily.