Summary: | ASTERISK-24293: Asterisk adds ';2' to channel id in ARI events | ||
Reporter: | Pavel Kukin (pavelsc) | Labels: | |
Date Opened: | 2014-08-31 18:00:26 | Date Closed: | 2014-08-31 23:31:14 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | |
Versions: | 12.5.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I create channel via ARI with the next data:
{ app: 'Queue', endpoint: 'Local/skynet.device-1900@queue_members.dial', channelId: '1651f065-c45e-4dbc-b187-ca97eb1caf5b.testqueue.74' } ARI sends me successfull response body: {"id":"1651f065-c45e-4dbc-b187-ca97eb1caf5b.testqueue.74","state":"Down","name":"Local/skynet.device-1900@queue_members.dial-00000047;1","caller":{"name":"","number":""},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"queue_members.dial","exten":"skynet.device-1900","priority":1},"creationtime":"2014-08-27T00:22:07.653+0000"} Then I add channels to existing bridge: /bridges/b1cc1a44-0091-49db-ad62-97d165d70c05/addChannel { channel: '1651f065-c45e-4dbc-b187-ca97eb1caf5b.testqueue.74,1409098921.725' } After that I start to receive strange events with ;2 everywhere: ws received: {"type":"ChannelDialplan","dialplan_app":"Set","timestamp":"2014-08-27T00:22:07.672+0000","dialplan_app_data":"QUEUE=testqueue.74;2","channel":{"id":"1651f065-c45e-4dbc-b187-ca97eb1caf5b.testqueue.74;2","state":"Ring","name":"Local/skynet.device-1900@queue_members.dial-00000047;2","caller":{"name":"","number":""},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"queue_members.dial","exten":"skynet.device-1900","priority":1},"creationtime":"2014-08-27T00:22:07.660+0000"},"application":"Queue"} ws received: {"channel":{"id":"1651f065-c45e-4dbc-b187-ca97eb1caf5b.testqueue.74;2","state":"Ring","name":"Local/skynet.device-1900@queue_members.dial-00000047;2","caller":{"name":"","number":""},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"queue_members.dial","exten":"skynet.device-1900","priority":1},"creationtime":"2014-08-27T00:22:07.660+0000"},"application":"Queue","variable":"QUEUE","type":"ChannelVarset","value":"testqueue.74;2","timestamp":"2014-08-27T00:22:07.673+0000"} | ||
Comments: | By: Matt Jordan (mjordan) 2014-08-31 23:31:14.595-0500 This is not a bug. You are creating a Local channel. That always creates two channels. Since you failed to provide another channel ID for the second half of the channel, Asterisk added the ';2' - otherwise, you'd have two channels with the same ID, which wouldn't work very well for your application at all. As noted in the ARI documentation, you need to use the {{otherChannelId}} field: {quote} otherChannelId: string - The unique id to assign the second channel when using local channels. {quote} By: Matt Jordan (mjordan) 2014-08-31 23:35:35.086-0500 In the future, you should raise your questions on the {{asterisk-app-dev}} mailing list. Based on the description of your issue, I think you will have more questions about how Asterisk works with Local channels, and how the subscription model of ARI works. Rather than deal with this on the issue tracker - which is *not* a support forum - future questions should be directed to that mailing list. |