DEVICE_STATE CHANNELS and BRIDGES on topics

Hi,

At the end of a call, I have some lines on stasis show topics :

ari:application/MyApp_ExternalMedia
bridge:all/bridge:33b7842d-608b-4069-9f1f-627d1b495e41
devicestate:all/Snoop/e34fc9f8-1f6a-49f1-be4e-f0683366e655
devicestate:all/UnicastRTP/127.0.0.1:6900

But there is no channels or no bridges opened, at the end of the call I close everything.

Do you know why it appears here? The only way I found to remove it is core restart now

Thanks

What version of Asterisk? What does “close” mean within this context? What is the output of “bridge show all” and of “core show channels”?

Hi,

I have Asterisk 20.4.0,

ip55*CLI> bridge show all
Bridge-ID                            Chans Type            Technology      Duration
ip55*CLI>
ip55*CLI> core show channels
Channel                                                          Location                         State   Application(Data)
0 active channels
0 active calls
0 calls processed
ip55*CLI>

Using nodejs:
ari.channels.hangup({channelId: channelToClose.id}); for every opened channels
ari.bridges.destroy({bridgeId: bridgeToClose.id});
ari.stop(this.ariAppname)

I also have a record (using a snoop channel) and a listen server for the Speech To Text (using a second snoop channel) that I close:

ari.recordings.cancel({recordingName:XXX})
audioServer.destroy()

I would suggest filing an issue then with a simplified ARI application that reproduces the issue.

Thanks I will try doing it.
I thought about 2 possibilities:
1: the channel which is snooped 2 times is connected to the application and even if I use ari.stop(this.ariAppname) it is not enough to destroy it…then the channels, bridges and RTP left residues
2: The record is not properly made and causes the residues, and that is why sometimes the record of the next call is is not working

By the way, when the application of the next call is created, the previous one is destroyed and disapear from the topics to let the place to the new one:

1st call:

-- Channel PJSIP/callee-00000000 left 'simple_bridge' stasis-bridge <47120b4e-b89a-48a3-9674-5adf20f1d33c>
    -- Channel Announcer/ARI_MOH-00000000;2 left 'simple_bridge' stasis-bridge <47120b4e-b89a-48a3-9674-5adf20f1d33c>
    -- Stopped music on hold on Announcer/ARI_MOH-00000000;1
    -- Channel Snoop/163515e7-ff9d-411b-8388-201376b4c79c-00000001 left 'simple_bridge' stasis-bridge <9039b8e0-d20f-407c-8cab-d9cfbda9e86e>
    -- Channel Recorder/ARI-00000001;2 left 'simple_bridge' stasis-bridge <9039b8e0-d20f-407c-8cab-d9cfbda9e86e>
    -- User hung up
 Deactivating Stasis app 'externalMedia_1'

next call:

Creating Stasis app 'externalMedia_2'
 Shutting down application 'externalMedia_1'
 Destroying Stasis app externalMedia_1
    -- Remove stasis-externalMedia_1/h/1, registrar=res_stasis; con=stasis-externalMedia_1(0x7f5628007590); con->root=0x7f5628007980
    -- Remove stasis-externalMedia_1/_./1, registrar=res_stasis; con=stasis-externalMedia_1(0x7f5628007590); con->root=0x7f5628007980
  == WebSocket connection from '127.0.0.1:57166' for protocol '' accepted using version '13'
    -- Called callee
       > 0x7f562c013850 -- Strict RTP learning after remote address set to: 127.0.0.1:6900

Hi,

I have a beginning of an answer:
I used a simplest code →

Create a bridge 'mixing'
Create 2 channels 'loc' and 'ext'
Connect the 2 channels to the bridge
Originate with 'loc'
Use ExternalMedia with 'ext'

By using ExternalMedia, a new channel is created as a replica of 'ext', so this one needed to be closed with channel.hangup().

With this, and ari.stop(this.ariAppname), all the topics disappeared except
devicestate:all/UnicastRTP/127.0.0.1:6900
There is something on ExternalMedia related to this?

The external media channel when using RTP is a UnicastRTP channel underneath. I don’t know why such topic would not be going away.

Thanks, me too…This is the same thing that hanging up the replica of the ext channel. It is supposed to be closed with ext.
Do you know how to find informations of this UnicastRTP channel to close this topic?

I’m not sure what you’re asking. The external media returns a channel, which is a UnicastRTP channel. If you’ve hung that up, there’s nothing else you can do.

Any further information requires investigating that specific aspect and understanding what is managing the lifetime of that topic, if it’s correct or not, and likely more.

Thanks! and so, what is this topic?

It’s in the name of it, a topic regarding device state.

Thanks, when I add to my code a snoop channel it is the same problem : devicestate:all/Snoop/c3d205ec-9ce2-4fdf-9a20-d17ad6771770

If I find something I will update the post

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