UnicastRTP channel cannot hungup

I have a external media application, and after the call, I use core show channels verbose to show the channels:

Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgeID            
UnicastRTP/127.0.0.1 default              s                   1 Up      Stasis       externalMedia                             01:18:07                         e9dcb2e9-9287-4806-8

Seem the external media channel cannot leave automatically. Can I use a CLI command to hungup it?

I tried the below but failed:

channel request hangup UnicastRTP/127.0.0.1
UnicastRTP/127.0.0.1 is not a known channel

That’s not the full name of the channel. Use tab completion to complete the channel name.

Can the full name show in the result of core show channels ?

core show channels verbose

It may or may not…

If you’re also using external media in ARI, you can also hang it up in… there…

Yes, I am using ARI and I tried to hung up the channel when ‘StasisEnd’ event. It doesn’t work.

Then you should show what you are actually doing, what HTTP request is made, and what happens.

here is my code

// Subscribe to StasisEnd event to handle call end
    client.on('StasisEnd', (event, channel) => {
      console.log('Call ended for channel:', channel.id);
      ari.disconnect();
      process.exit(0);
    });

That doesn’t hang anything up. Disconnecting your ARI application does not destroy any resources in Asterisk, such as channels you’ve originated, external media channels, bridges, etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.