no such channel when HangupAction

Feb 6, 2014 at 2:47 PM
how to resolve the problem of "no such channel" when Hangup Action.Can you help me plllllz it is urgent :/
Feb 6, 2014 at 3:07 PM
Does the channel exist? If so, can you paste in here the code your passing, the channel name you're passing in the action and the output of "core show channels" in the asterisk CLI to show the channel in asterisk.
Feb 7, 2014 at 10:33 AM
thank you skrusty to reply me, here is the code that I call him after making a succes call with the class OriginateAction :
Dim result As String = s.Raccrocher("101")
'result return "ManagerError{DateReceived:xx:xx:xx;ActionId:xxxx;Message:No such channel; Response:Error}"
Dim manager As New ManagerConnection
Public Function Raccrocher(CallerId As String) As String
        manager= New ManagerConnection(address, port, userr, password)
        Catch ex As Exception
            MsgBox("Erreur de connection\n" + ex.Message)
        End Try        

        Dim hp As New HangupAction()
        hp.Channel = "SIP/" + CallerId
            Dim hangupResponse As ManagerResponse = manager.SendAction(hp)
            Return hangupResponse.ToString
        Catch ex As Exception
            Return ex.Message
        End Try
    End Function
Feb 7, 2014 at 1:43 PM
101 isn't a valid channel name. That's an extension.
Feb 7, 2014 at 3:31 PM
the channel that I passed in the call is SIP/101.
Feb 7, 2014 at 4:05 PM

you can get all active channels with the Status event,.

But before you have to fire a Action, otherwise the Event is not triggered

You can start with this
    private void GetChannelStatus()
        StatusAction sa = new StatusAction();
            ManagerResponse mr = astCon.SendAction(sa, 10000);
            Console.WriteLine("Transfer Call" + "\n\tResponse:" + mr.Response + "\n\tMessage:" + mr.Message);
        catch (Exception ex)
after fireing this command the StatusEvent is triggered and you get all active channels. If a call is active you always have two channels.