[asterisk-bugs] [JIRA] (ASTERISK-25630) Create a bridge from ARI with an id of one that already exists

Matt Jordan (JIRA) noreply at issues.asterisk.org
Tue Dec 15 17:11:33 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228645#comment-228645 ] 

Matt Jordan commented on ASTERISK-25630:
----------------------------------------

This isn't a bug - the {{POST}} HTTP request will create or update an existing bridge. (Yes, it should have been a {{PUT}}... sorry about that :-( )

Quoting the wiki page here:

{quote}
createWithId: POST /bridges/{bridgeId}

Create a new bridge or updates an existing one. This bridge persists until it has been shut down, or Asterisk has been shut down.
Path parameters

    bridgeId: string - Unique ID to give to the bridge being created.

Query parameters

    type: string - Comma separated list of bridge type attributes (mixing, holding, dtmf_events, proxy_media) to set.
    name: string - Set the name of the bridge.
{quote}

So, when you ran the ARI query on the existing bridge, you changed the mixing type from {{simple_bridge}} to {{holding}}. That's a pretty intrusive change to make ... but it did it anyway. When you deleted the bridge, it then destroyed it.

ARI is very careful about protecting the users from manipulating channels they don't own. It isn't quite so careful about bridges, simply because bridges have a much looser ownership model internally in Asterisk. As such, you're free to shoot yourself in the foot with ARI when it comes to updating bridges that already exist.

> Create a bridge from ARI with an id of one that already exists
> --------------------------------------------------------------
>
>                 Key: ASTERISK-25630
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25630
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_ari_bridges
>    Affects Versions: 13.6.0
>            Reporter: Sylvain Boily
>
> Hello,
> A call B
> B answer
> You have a bridge
> On my asterisk CLI:
> {code}
> xivo*CLI>  bridge show b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc
> Id: b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc
> Type: basic
> Technology: simple_bridge
> Num-Channels: 2
> Channel: SIP/tcu9tz-00000032
> Channel: SIP/c4i2zd-00000031
> {code}
> Now with swagger UI on bridges section.
> {code}
> POST /bridges/b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc with type holding for
> example.
> 200 ok
> {code}
> On asterisk CLI:
> {code}
> xivo*CLI>  bridge show b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc
> Id: b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc
> Type: stasis
> Technology: holding_bridge
> Num-Channels: 0
> {code}
> On swagger UI:
> {code}
> DELETE /bridges/b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc
> 204 ok
> {code}
> On asterisk CLI:
> {code}
> xivo*CLI>  bridge show b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc
> Bridge 'b1d8fb21-ec6d-469a-9dde-bb6bfd5618cc' not found
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list