ARI can't call DELETE (hangup) on channels in listing results in 404 channel not found?

Hello,

Strange issue here… I’m trying to clean up channels created through ARI and our Statis app. Problem is calling the DELTE method on the channels endpoint results in “Channel not found” although its in the listing.

Any ideas?

GET http://192.168.8.138:8088/ari/channels

[
    {
        "id": "1726884448.2196",
        "name": "Local/1002@from-internal-0000030f;1",
        "state": "Down",
        "protocol_id": "",
        "caller": {
            "name": "",
            "number": ""
        },
        "connected": {
            "name": "",
            "number": ""
        },
        "accountcode": "",
        "dialplan": {
            "context": "from-internal",
            "exten": "1002",
            "priority": 1,
            "app_name": "Stasis",
            "app_data": "liberty-pbx-app-119056346368394845989157795379025490458"
        },
        "creationtime": "2024-09-21T02:07:28.574+0000",
        "language": "en"
    },
    {
        "id": "1726707806.1685",
        "name": "Local/1002@from-internal-00000263;1",
        "state": "Ringing",
        "protocol_id": "",
        "caller": {
            "name": "",
            "number": ""
        },
        "connected": {
            "name": "",
            "number": ""
        },
        "accountcode": "",
        "dialplan": {
            "context": "from-internal",
            "exten": "1002",
            "priority": 1,
            "app_name": "Stasis",
            "app_data": "liberty-pbx-app-329706568332717888288136760337380079709"
        },
        "creationtime": "2024-09-19T01:03:26.963+0000",
        "language": "en"
    },
    {
        "id": "1726886333.2286",
        "name": "Local/1002@from-internal-0000032d;1",
        "state": "Ringing",
        "protocol_id": "",
        "caller": {
            "name": "",
            "number": ""
        },
        "connected": {
            "name": "",
            "number": ""
        },
        "accountcode": "",
        "dialplan": {
            "context": "from-internal",
            "exten": "1002",
            "priority": 1,
            "app_name": "Stasis",
            "app_data": "liberty-pbx-app-159977238423416320457114258735929874878"
        },
        "creationtime": "2024-09-21T02:38:53.247+0000",
        "language": "en"
    },
    {
        "id": "1726714534.1793",
        "name": "Local/1002@from-internal-00000287;1",
        "state": "Ringing",
        "protocol_id": "",
        "caller": {
            "name": "",
            "number": ""
        },
        "connected": {
            "name": "",
            "number": ""
        },
        "accountcode": "",
        "dialplan": {
            "context": "from-internal",
            "exten": "1002",
            "priority": 1,
            "app_name": "Stasis",
            "app_data": "liberty-pbx-app-26505121191310271023031681895642958061"
        },
        "creationtime": "2024-09-19T02:55:34.626+0000",
        "language": "en"
    },
    {
        "id": "1727115697.3407",
        "name": "Local/1002@from-internal-000004a5;1",
        "state": "Ringing",
        "protocol_id": "",
        "caller": {
            "name": "",
            "number": ""
        },
        "connected": {
            "name": "",
            "number": ""
        },
        "accountcode": "",
        "dialplan": {
            "context": "from-internal",
            "exten": "1002",
            "priority": 1,
            "app_name": "Stasis",
            "app_data": "liberty-pbx-app-96812954624018722194925831420489757226"
        },
        "creationtime": "2024-09-23T18:21:37.981+0000",
        "language": "en"
    }
]

DELETE http://192.168.8.138:8088/ari/channels/1727115697.3407

{
    "message": "Channel not found"
}

Do the channels appear in “core show channels”? Can they be hung up using “channel request hangup”? What version of Asterisk?

I think you reference the channel by the value of the “name” field in the above, not the “id”.

No, you use id. The version of Asterisk is important because we fixed an issue where channels would appear to exist but they were really gone, so interacting with them (such as hanging them up) would say they weren’t found.

It’s Asterisk 18.23.1

That version of Asterisk does not have the fix for the issue I remembered[1].

[1] [bug]: Under certain circumstances a channel snapshot can get orphaned in the cache · Issue #783 · asterisk/asterisk · GitHub

Thanks @jcolp the fix does appear to included in the current latest release of version 18 18.24.3.

I’ll update to that.

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